diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-10-30 04:08:58 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-10-30 04:08:58 +0000 |
commit | 9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c (patch) | |
tree | 44df27f8867ae748b1923888bdd9bde08c65034e /string/bits/string2.h | |
parent | f58580396d75a6d7429a909444ad8b70dd7dfff8 (diff) | |
download | glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.tar.gz glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.tar.xz glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.zip |
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>
Diffstat (limited to 'string/bits/string2.h')
-rw-r--r-- | string/bits/string2.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/string/bits/string2.h b/string/bits/string2.h index de427f8cb4..bf174a4c8c 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -727,7 +727,8 @@ __stpcpy_small (char *__dest, __builtin_constant_p (src) && __builtin_constant_p (n) \ ? (strlen (src) < ((size_t) (n)) \ ? strcat (__dest, src) \ - : (memcpy (strchr (__dest, '\0'), src, n), __dest)) \ + : (*((char *) __mempcpy (strchr (__dest, '\0'), \ + src, n)) = '\0', __dest)) \ : strncat (dest, src, n); })) # else # define strncat(dest, src, n) \ @@ -914,7 +915,7 @@ __strcspn_c3 (__const char *__s, char __reject1, char __reject2, ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? 0 \ + ? ((void) (s), 0) \ : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ ? __strspn_c1 (s, __a0) \ : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ @@ -969,7 +970,7 @@ __strspn_c3 (__const char *__s, char __accept1, char __accept2, char __accept3) ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? NULL \ + ? ((void) (s), NULL) \ : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ ? strchr (s, __a0) \ : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ |