From 9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Oct 2000 04:08:58 +0000 Subject: Update. * string/bits/string2.h (strspn): Evaluate first argument if second is "". (strpbrk): Likewise. * sysdeps/i386/i486/bits/string.h: Likewise. * string/Makefile (tests): Add bug-strspn1 and bug-strpbrk1. * string/bug-strspn1.c: New file. * string/bug-strpbrk1.c: New file. Test cases by Joseph S. Myers . * string/bits/string2.h (strncat): Terminate string correctly. * sysdeps/i386/i486/bits/string.h (strncat): Likewise. * string/Makefile (tests): Add bug-strncat1. * string/bug-strncat1.c: New file. Test case by Joseph S. Myers . 2000-10-27 Ben Collins * sysdeps/generic/lockf.c (lockf): Set l_type to F_RDLCK before calling for F_GETLK. 2000-10-29 Ulrich Drepper --- string/bug-strpbrk1.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 string/bug-strpbrk1.c (limited to 'string/bug-strpbrk1.c') diff --git a/string/bug-strpbrk1.c b/string/bug-strpbrk1.c new file mode 100644 index 0000000000..7d5eef8e41 --- /dev/null +++ b/string/bug-strpbrk1.c @@ -0,0 +1,18 @@ +/* Test case by Joseph S. Myers . */ +#define __USE_STRING_INLINES +#include +#include +#include + +int +main (void) +{ + const char *a = "abc"; + const char *b = a; + + strpbrk (b++, ""); + if (b != a + 1) + exit (1); + + exit (0); +} -- cgit v1.2.3