about summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
Diffstat (limited to 'string')
-rw-r--r--string/bits/string2.h4
-rw-r--r--string/tst-inlcall.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/string/bits/string2.h b/string/bits/string2.h
index 1a58716710..01ef975c7b 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -1,5 +1,5 @@
 /* Machine-independant string function optimizations.
-   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -1019,7 +1019,7 @@ __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
   ({ char __a0, __a1, __a2;						      \
      (__builtin_constant_p (accept) && __string2_1bptr_p (accept)	      \
       ? ((__a0 = ((__const char  *) (accept))[0], __a0 == '\0')		      \
-	 ? ((void) (s), NULL)						      \
+	 ? ((void) (s), (char *) NULL)					      \
 	 : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0')	      \
 	    ? strchr (s, __a0)						      \
 	    : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0')	      \
diff --git a/string/tst-inlcall.c b/string/tst-inlcall.c
index 9edc973259..2a4124ea50 100644
--- a/string/tst-inlcall.c
+++ b/string/tst-inlcall.c
@@ -1,5 +1,5 @@
 /* Tester for calling inline string functions.
-   Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -62,6 +62,13 @@ main (void)
       ++errors;
     }
 
+  const char * const hw = "hello world";
+  if (strpbrk (hw, "o") - hw != 4)
+    {
+      puts ("strpbrk test 1 failed");
+      ++errors;
+    }
+
   if (errors == 0)
     {
       status = EXIT_SUCCESS;