On Apr 22, 2012, at 7:58 PM, Christiano F. Haesbaert wrote:

> On Sun, Apr 22, 2012 at 06:36:41PM +0200, Franco Fichtner wrote:
>> Just being paranoid... strncmp?
>
> Why ? It's a terminated string vs a string literal, what do you wanna
> use as the third argument: strlen("AuthenticAmd") ? . 100% pointless.

I can see your point and yet it is being used in the line below your change.
Do you want to call that author's intent '100% pointless' as well just for the
sake of winning an argument or do you simply not care about the depth and
inherent wisdom of the code base you are working on?

>
>> And how about consolidating style while at it? "!" vs. "== 0" - see code
bits below change.
>
> Consolidating how ? Are you suggesting we change all strcmp calls in
> kernel to use "== 0" ? Please.

Personally, I don't care either way, but it's bad style to ignore the context
and change styles. It makes the code harder to read, understand and maintain.
Take a look. Ok?

>>> +    if (!strcmp(cpu_vendor, "AuthenticAMD"))
>>>       amd64_errata(ci);
>>>
>>>   if (strncmp(mycpu_model, "VIA Nano processor", 18) == 0) {


Franco

Reply via email to