mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-17 13:00:43 +08:00
Update.
* sysdeps/generic/memccpy.c (__memccpy): Don't use reg_char type for x since promotion in comparison might leads to unexpected results. Reported by Dan Pop <Dan.Pop@cern.ch>.
This commit is contained in:
parent
fc08075dc6
commit
74a0513daf
@ -1,5 +1,9 @@
|
||||
2000-05-07 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/generic/memccpy.c (__memccpy): Don't use reg_char type
|
||||
for x since promotion in comparison might leads to unexpected
|
||||
results. Reported by Dan Pop <Dan.Pop@cern.ch>.
|
||||
|
||||
* iconv/Makefile (tests): Add tst-iconv1.
|
||||
* iconv/tst-iconv1.c: New file.
|
||||
* iconv/gconv_simple.c (internal_ucs4_loop): Prefer reporting
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1995, 1997, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1995, 1997, 1999, 2000 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
|
||||
@ -17,7 +17,6 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <string.h>
|
||||
#include <memcopy.h>
|
||||
|
||||
#undef __memccpy
|
||||
#undef memccpy
|
||||
@ -27,12 +26,14 @@
|
||||
NULL if C was not found in the first N bytes of SRC. */
|
||||
void *
|
||||
__memccpy (dest, src, c, n)
|
||||
void *dest; const void *src;
|
||||
int c; size_t n;
|
||||
void *dest;
|
||||
const void *src;
|
||||
int c;
|
||||
size_t n;
|
||||
{
|
||||
register const char *s = src;
|
||||
register char *d = dest;
|
||||
register const reg_char x = (unsigned char) c;
|
||||
register const char x = c;
|
||||
register size_t i = n;
|
||||
|
||||
while (i-- > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user