lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1491663025.3250.39.camel@perches.com>
Date:   Sat, 08 Apr 2017 07:50:25 -0700
From:   Joe Perches <joe@...ches.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>,
        linux-rdma@...r.kernel.org,
        Bart Van Assche <bart.vanassche@...disk.com>,
        Doug Ledford <dledford@...hat.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Sean Hefty <sean.hefty@...el.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/3] IB/srp: Enclose 14 expressions for the sizeof
 operator by parentheses

On Sat, 2017-04-08 at 14:12 +0200, SF Markus Elfring wrote:
[]
> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
[]
> @@ -3308,7 +3308,7 @@ static ssize_t srp_create_target(struct device *dev,
>  	target_host->max_channel = 0;
>  	target_host->max_id      = 1;
>  	target_host->max_lun     = -1LL;
> -	target_host->max_cmd_len = sizeof ((struct srp_cmd *) (void *) 0L)->cdb;
> +	target_host->max_cmd_len = sizeof(((struct srp_cmd *)(void *)0L)->cdb);

Maybe better as:

	target_host->max_cmd_len = FIELD_SIZEOF(struct srp_cmd, cdb);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ