Remove K&R cruft.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2003 07:10:43 +0000 (07:10 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2003 07:10:43 +0000 (07:10 +0000)
lib/strchrnul.c
m4/strchrnul.m4

index 694e24a0ab3a2afd1ec316131a4dcb1750378cdd..db42e28734bb6a444439d6066f13fb5adeaa4eab 100644 (file)
 
 /* Find the first occurrence of C in S or the final NUL byte.  */
 char *
-strchrnul (s, c_in)
-     const char *s;
-     int c_in;
+strchrnul (const char *s, int c_in)
 {
-  while (*s && (*s != c_in))
+  unsigned char c = c_in;
+  while (*s && (*s != c))
     s++;
 
-  return (char*) s;
+  return (char *) s;
 }
index 565e338d5cefbfbf704a1605f768275b9e3b07fd..51edfb302856e5ce0d7b1a4f9bd0856a626a5afe 100644 (file)
@@ -1,4 +1,4 @@
-# strchrnul.m4 serial 1
+# strchrnul.m4 serial 2
 dnl Copyright (C) 2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -18,6 +18,4 @@ AC_DEFUN([gl_FUNC_STRCHRNUL],
 ])
 
 # Prerequisites of lib/strchrnul.c.
-AC_DEFUN([gl_PREREQ_STRCHRNUL], [
-  AC_CHECK_HEADERS_ONCE(string.h)
-])
+AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])