about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-20 08:12:32 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-20 08:12:32 +0000
commit58d2d09bde3578bd25d55df03e962764ba81bd13 (patch)
treea81e5d97ffe5a9b3be7ae44e18a314f78ffa880a /sysdeps
parent9a1eb38e4e9319036f37c1efbf5288a169e23324 (diff)
downloadglibc-58d2d09bde3578bd25d55df03e962764ba81bd13.tar.gz
glibc-58d2d09bde3578bd25d55df03e962764ba81bd13.tar.xz
glibc-58d2d09bde3578bd25d55df03e962764ba81bd13.zip
Update.
	* sysdeps/generic/dl-tls.c (allocate_dtv): Optimize a bit.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-tls.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c
index 38f40ac8ae..c969464449 100644
--- a/sysdeps/generic/dl-tls.c
+++ b/sysdeps/generic/dl-tls.c
@@ -212,11 +212,9 @@ allocate_dtv (void *result)
     {
       /* This is the initial length of the dtv.  */
       dtv[0].counter = dtv_length;
-      /* Fill in the generation number.  */
-      dtv[1].counter = GL(dl_tls_generation) = 0;
-      /* Initialize all of the rest of the dtv with zero to indicate
-	 nothing there.  */
-      memset (dtv + 2, '\0', dtv_length * sizeof (dtv_t));
+      /* Initialize all of the rest of the dtv (including the
+	 generation counter) with zero to indicate nothing there.  */
+      memset (dtv + 1, '\0', (dtv_length + 1) * sizeof (dtv_t));
 
       /* Add the dtv to the thread data structures.  */
       INSTALL_DTV (result, dtv);