[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DB7DC28.5090900@pavlinux.ru>
Date: Wed, 27 Apr 2011 13:04:40 +0400
From: Pavel Vasilyev <pavel@...linux.ru>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] linux/string.h: Introduce streq macro.
27.04.2011 12:49, Miguel Ojeda пишет:
> On Wed, Apr 27, 2011 at 10:42 AM, Geert Uytterhoeven
> <geert@...ux-m68k.org> wrote:
>> On Wed, Apr 27, 2011 at 10:29, Miguel Ojeda
>> <miguel.ojeda.sandonis@...il.com> wrote:
>>> On Tue, Apr 26, 2011 at 9:58 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
>>>> On Tue, 2011-04-26 at 16:47 -0300, Thiago Farina wrote:
>>>>
>>>>>> $ grep -rP --include=*.[ch] "\bstrcmp.*==\s*0\b" * | wc -l
>>>>>> 1143
>>>>>> $ grep -rP --include=*.[ch] "\!\s*strcmp\s*\(" * | wc -l
>>>>>> 1663
>>>>>>
>>>>>> Can you count how many misuses of strcmp have been
>>>>>> corrected?
>>>>>
>>>>>> Do you plan to convert the existing 2800?
>>>>>
>>>>> I'd work on this without any problem.
>>>>
>>>> Nothing a perl script can't do either.
>>>
>>> If you are really going to do that, please use a coccinelle's semantic
>>> patch (which is designed precisely for that purpose) and document it
> Hi, on the contrary: I don't agree with the change unless a policy ...
I came up with the best :)
# cd /usr/src/linux-2.6
# for i in `grep strncmp ./ -R | cut -d: -f1,1`; \
do \
sed -i '/strncmp/ s//memcmp/g;' $i; \
done;
--
Pavel.
Download attachment "0x03742489.asc" of type "application/pgp-keys" (2525 bytes)
Powered by blists - more mailing lists