aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-10-04 17:06:55 +0000
committerRoland McGrath <roland@gnu.org>1995-10-04 17:06:55 +0000
commit5f770861196fee245b039c1f349a25d460d30ade (patch)
treebd3caa70201b5bbb51022524934a8ae6fbfd1a99
parent879bf2e65a9ddaea34fe0428ab0f71caca4b4d00 (diff)
downloadglibc-5f770861196fee245b039c1f349a25d460d30ade.tar
glibc-5f770861196fee245b039c1f349a25d460d30ade.tar.gz
glibc-5f770861196fee245b039c1f349a25d460d30ade.tar.bz2
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.
-rw-r--r--ChangeLog6
-rw-r--r--elf/dlopen.c4
-rw-r--r--sysdeps/generic/stpncpy.c5
3 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index fa55087b00..00a896a349 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
Sat Sep 30 11:47:05 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): If started by
diff --git a/elf/dlopen.c b/elf/dlopen.c
index c16cff9ae2..de65a20d97 100644
--- a/elf/dlopen.c
+++ b/elf/dlopen.c
@@ -30,7 +30,7 @@ dlopen (const char *file, dl_open_mode mode)
{
Elf32_Addr init;
- new = _dl_map_object (_dl_loaded, file, NULL);
+ new = _dl_map_object (_dl_loaded, file);
/* Map in any dependencies. */
for (l = new; l; l = l->l_next)
@@ -43,7 +43,7 @@ dlopen (const char *file, dl_open_mode mode)
const Elf32_Dyn *d;
for (d = l->l_ld; d->d_tag != DT_NULL; ++d)
if (d->d_tag == DT_NEEDED)
- _dl_map_object (l, strtab + d->d_un.d_val, NULL);
+ _dl_map_object (l, strtab + d->d_un.d_val);
}
l->l_deps_loaded = 1;
}
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;
}