[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1426851739.20946.18.camel@thorin>
Date: Fri, 20 Mar 2015 12:42:18 +0100
From: Bernd Petrovitsch <bernd@...rovitsch.priv.at>
To: Arjun Sreedharan <arjun024@...il.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86,boot: standardize strcmp()
On Don, 2015-03-19 at 10:34 -0700, H. Peter Anvin wrote:
> On 03/17/2015 07:13 AM, Arjun Sreedharan wrote:
> > On a related note, IMO strcmp() should return {-1,0,1} since many
> > programmers just expect this behavior. just my opinion.
One doesn't change an API just for a claimed expection for an unprooved
number of cases.
> I would challenge that assumption, *especially* in the context of kernel
> programming. Let's not waste time on that crap.
Even if the assumption is correct (which I'm not implying - quite the
opposite), than these programmers are not well educated enough and -
thus;-) - write buggy code. They also fail to strive for mot possible
robustness.
BTW POSIX' strcmp() description on
http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcmp.html
als states "> 0, == 0 or < 0" (and ISO-C seem to also see it that way).
Kind regards,
Bernd
--
"I dislike type abstraction if it has no real reason. And saving
on typing is not a good reason - if your typing speed is the main
issue when you're coding, you're doing something seriously wrong."
- Linus Torvalds
--
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