[PATCH] Add strchrnul
Christopher Faylor
cgf-use-the-mailinglist-please@sourceware.org
Sun Apr 17 16:22:00 GMT 2011
On Fri, Apr 15, 2011 at 02:17:20PM -0600, Eric Blake wrote:
>On 04/15/2011 01:09 PM, Eric Blake wrote:
>> On 03/27/2011 09:37 PM, Yaakov (Cygwin/X) wrote:
>>> I'm attaching a patch and new C file to implement strchrnul, a GNU
>>> extension.
>>>
>>> Corinna: patch for winsup being posted to cygwin-patches.
>>
>>> char *
>>> _DEFUN (strchrnul, (s1, i),
>>> _CONST char *s1 _AND
>>> int i)
>>> {
>>> char *s = strchr(s1, i);
>>>
>>> if (*s != NULL)
>>
>> Oops. That's a SEGV waiting to happen.
>
>I'm pushing this:
>
>2011-04-15 Eric Blake <eblake@redhat.com>
>
> * libc/string/strchrnul.c (strchrnul): Fix strchrnul.
The fix looks ok but your ChangeLog could use some work.
More information about the Newlib
mailing list