mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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 <jsm28@cam.ac.uk>. * 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 <jsm28@cam.ac.uk>. 2000-10-27 Ben Collins <bcollins@debian.org> * sysdeps/generic/lockf.c (lockf): Set l_type to F_RDLCK before calling for F_GETLK. 2000-10-29 Ulrich Drepper <drepper@redhat.com>
This commit is contained in:
18
string/bug-strpbrk1.c
Normal file
18
string/bug-strpbrk1.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Test case by Joseph S. Myers <jsm28@cam.ac.uk>. */
|
||||
#define __USE_STRING_INLINES
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
const char *a = "abc";
|
||||
const char *b = a;
|
||||
|
||||
strpbrk (b++, "");
|
||||
if (b != a + 1)
|
||||
exit (1);
|
||||
|
||||
exit (0);
|
||||
}
|
Reference in New Issue
Block a user