projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Module setenv does not depend on 'malloc-posix', 'realloc-posix'.
[gnulib.git]
/
lib
/
strchrnul.c
diff --git
a/lib/strchrnul.c
b/lib/strchrnul.c
index
0902c18
..
f834d34
100644
(file)
--- a/
lib/strchrnul.c
+++ b/
lib/strchrnul.c
@@
-1,5
+1,5
@@
/* Searching in a string.
/* Searching in a string.
- Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2008
, 2009, 2010
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-37,6
+37,8
@@
strchrnul (const char *s, int c_in)
unsigned char c;
c = (unsigned char) c_in;
unsigned char c;
c = (unsigned char) c_in;
+ if (!c)
+ return rawmemchr (s, 0);
/* Handle the first few bytes by reading one byte at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
/* Handle the first few bytes by reading one byte at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */