From: Ulrich Drepper Date: Mon, 23 Mar 1998 11:50:23 +0000 (+0000) Subject: (_dl_close): Fix byte count while removing the shared object from the X-Git-Tag: cvs/before-sparc-2_0_x-branch~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=945f108698529c9f5846f05ba63accbc056f1124;p=thirdparty%2Fglibc.git (_dl_close): Fix byte count while removing the shared object from the global scope list and optimize a little bit. --- diff --git a/elf/dl-close.c b/elf/dl-close.c index ca02eaae4e5..e49054acee4 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -83,10 +83,9 @@ _dl_close (struct link_map *map) do --tail; while (*tail != imap); + memcpy (tail, tail + 1, + (char *) _dl_global_scope_end - (char *) tail); --_dl_global_scope_end; - memcpy (tail, tail + 1, _dl_global_scope_end - tail); - _dl_global_scope_end[0] = NULL; - _dl_global_scope_end[1] = NULL; } /* We can unmap all the maps at once. We just have to determine