]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Declare STATE as array of char instead of int and do not initialize it (done
authorUlrich Drepper <drepper@redhat.com>
Mon, 3 Apr 2000 07:15:23 +0000 (07:15 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 3 Apr 2000 07:15:23 +0000 (07:15 +0000)
by initstate_r).  Pass correct size.

string/strfry.c

index c13b3da979d2a48bada71297408e5ce6d6098dcf..11fc503bb9dd4070b36712d0f1065bc9c65dc7a0 100644 (file)
@@ -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;
     }