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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Nov 2017 01:36:57 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Hartley Sweeten <HartleyS@...ionengravers.com>
Cc:     Ian Abbott <abbotti@....co.uk>,
        Alex Frappier Lachapelle <alex.frappierlachapelle@...il.com>,
        "greg@...ah.com" <greg@...ah.com>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Staging: comedi: das16: Fixed a const struct coding
 style issue

On Mon, Nov 27, 2017 at 05:51:56PM +0000, Hartley Sweeten wrote:
> On Monday, November 27, 2017 3:28 AM, Ian Abbott wrote:
> > On 26/11/17 01:50, Alex Frappier Lachapelle wrote:
> >> +		const struct comedi_lrange *lrange;
> >
> > NAK.  The following lines of source code allocate memory pointed to by 'lrange' and modify it, so 'const' is not appropriate here.
> 
> Ian,
> 
> Wonder if it's worth putting a comment about this in the code. This has come up a
> couple times.
> 

Making it const generates a compile error.  A compile error is worth a
thousand comments as they say.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ