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]
Date:	Thu, 30 Jun 2011 18:21:59 -0700
From:	"H. Peter Anvin" <hpa@...ux.intel.com>
To:	Brian Gerst <brgerst@...il.com>
CC:	Greg Dietsche <greg@...mergreg.com>,
	"H. Peter Anvin" <hpa@...or.com>, mingo@...hat.com,
	linux-kernel@...r.kernel.org, Gregory.Dietsche@....edu,
	tglx@...utronix.de, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/cleanups] x86, smpboot: Mark names[] array as const

On 06/30/2011 06:20 PM, Brian Gerst wrote:
> On Thu, Jun 30, 2011 at 8:47 PM, H. Peter Anvin <hpa@...ux.intel.com> wrote:
>> On 06/30/2011 05:41 PM, Greg Dietsche wrote:
>>> On Thu, Jun 30, 2011 at 05:25:36PM -0700, H. Peter Anvin wrote:
>>>> On 06/30/2011 05:21 PM, tip-bot for Greg Dietsche wrote:
>>>>> +   const char const *names[] = { "ID", "VERSION", "SPIV" };
>>>>         ^^^^^^^^^^^^^^^^
>>>>
>>>> Doesn't make sense, patch removed...
>>>>
>>> could you explain a little more? I don't see my mistake.
>>> it compiles and is running on my box currently.
>>>
> 
> One const is for the strings, the other is for the array of pointers.
> 

Yes, the syntax is wrong for that.

const char * const names[] is I think what he wanted.

	-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ