diff options
author | Roland McGrath <roland@gnu.org> | 1995-10-04 17:06:55 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-10-04 17:06:55 +0000 |
commit | 5f770861196fee245b039c1f349a25d460d30ade (patch) | |
tree | bd3caa70201b5bbb51022524934a8ae6fbfd1a99 /sysdeps | |
parent | 879bf2e65a9ddaea34fe0428ab0f71caca4b4d00 (diff) | |
download | glibc-5f770861196fee245b039c1f349a25d460d30ade.tar.gz glibc-5f770861196fee245b039c1f349a25d460d30ade.tar.xz glibc-5f770861196fee245b039c1f349a25d460d30ade.zip |
Wed Oct 4 00:21:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/generic/stpncpy.c: Don't increment DEST when zero-filling. * elf/dlopen.c (dlopen): Don't pass USER_ENTRY arg to _dl_map_object.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/stpncpy.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sysdeps/generic/stpncpy.c b/sysdeps/generic/stpncpy.c index 40c9173477..d4a524086c 100644 --- a/sysdeps/generic/stpncpy.c +++ b/sysdeps/generic/stpncpy.c @@ -79,9 +79,8 @@ DEFUN(__stpncpy, (dest, src, n), char *dest AND CONST char *src AND size_t n) while (c != '\0'); zero_fill: - do - *++dest = '\0'; - while (--n > 0); + while (n-- > 0) + dest[n] = '\0'; return dest; } |