summary refs log tree commit diff
path: root/stdlib/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/random.c')
-rw-r--r--stdlib/random.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/random.c b/stdlib/random.c
index 63035484f4..06a4c97829 100644
--- a/stdlib/random.c
+++ b/stdlib/random.c
@@ -205,17 +205,17 @@ __initstate (seed, arg_state, n)
      char *arg_state;
      size_t n;
 {
-  char *ostate;
+  int32_t *ostate;
 
   __libc_lock_lock (lock);
 
-  ostate = (char *) &unsafe_state.state[-1];
+  ostate = &unsafe_state.state[-1];
 
   __initstate_r (seed, arg_state, n, &unsafe_state);
 
   __libc_lock_unlock (lock);
 
-  return ostate;
+  return (char *) ostate;
 }
 
 weak_alias (__initstate, initstate)
@@ -232,18 +232,18 @@ char *
 __setstate (arg_state)
      char *arg_state;
 {
-  char *ostate;
+  int32_t *ostate;
 
   __libc_lock_lock (lock);
 
-  ostate = (char *) &unsafe_state.state[-1];
+  ostate = &unsafe_state.state[-1];
 
   if (__setstate_r (arg_state, &unsafe_state) < 0)
     ostate = NULL;
 
   __libc_lock_unlock (lock);
 
-  return ostate;
+  return (char *) ostate;
 }
 
 weak_alias (__setstate, setstate)