From 5f770861196fee245b039c1f349a25d460d30ade Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 4 Oct 1995 17:06:55 +0000 Subject: Wed Oct 4 00:21:03 1995 Roland McGrath * 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. --- sysdeps/generic/stpncpy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sysdeps') 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; } -- cgit v1.2.3