about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--string/strfry.c4
-rw-r--r--sysdeps/generic/ldsodefs.h2
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c19ad73da..0fbfb3e7e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
+2000-03-31  Andreas Schwab  <schwab@suse.de>
+
+	* string/strfry.c: Declare STATE as array of char instead of int
+	and do not initialize it (done by initstate_r).  Pass correct
+	size.
+
 2000-04-03  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/generic/ldsodefs.h: Fix typo in comment.
+
 	* sysdeps/i386/dl-machine.h (RTLD_START): Squeeze one more
 	instruction out of the code.
 
diff --git a/string/strfry.c b/string/strfry.c
index c13b3da979..11fc503bb9 100644
--- a/string/strfry.c
+++ b/string/strfry.c
@@ -29,9 +29,9 @@ strfry (char *string)
 
   if (!init)
     {
-      static int state[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+      static char state[32];
       rdata.state = NULL;
-      __initstate_r (time ((time_t *) NULL), state, 8, &rdata);
+      __initstate_r (time ((time_t *) NULL), state, sizeof (state), &rdata);
       init = 1;
     }
 
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 023cdfe26a..757a5bc0d9 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -39,7 +39,7 @@ __BEGIN_DECLS
 /* All references to the value of l_info[DT_PLTGOT],
   l_info[DT_STRTAB], l_info[DT_SYMTAB], l_info[DT_RELA],
   l_info[DT_REL], l_info[DT_JMPREL], and l_info[VERSYMIDX (DT_VERSYM)]
-  have to accessed via the D_PTR macro.  The macro is needed since for
+  have to be accessed via the D_PTR macro.  The macro is needed since for
   most architectures the entry is already relocated - but for some not
   and we need to relocate at access time.  */
 #ifdef DL_RO_DYN_SECTION