diff options
author | Jim Meyering <jim@meyering.net> | 2005-01-15 17:13:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-01-15 17:13:03 +0000 |
commit | 6d638576d4cba1dee995aa614a9e6a978f4ae5c1 (patch) | |
tree | 6b1ecc838abdc7d39c94034096b55508f0d92134 | |
parent | 244ce2fb1a3d6f9a4c7d073099eb7cae570b6c66 (diff) | |
download | coreutils-6d638576d4cba1dee995aa614a9e6a978f4ae5c1.tar.xz |
(isaac_seed) [HAVE_GETHRTIME]: Don't call ISAAC_SEED
twice with the same value of `t'.
Replace nested #if-#else blocks with #if-#elif-#elif chain.
-rw-r--r-- | src/shred.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/shred.c b/src/shred.c index 19bdbb461..2e45ff256 100644 --- a/src/shred.c +++ b/src/shred.c @@ -1,6 +1,6 @@ /* shred.c - overwrite files and devices to make it harder to recover data - Copyright (C) 1999-2004 Free Software Foundation, Inc. + Copyright (C) 1999-2005 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999 Colin Plumb. This program is free software; you can redistribute it and/or modify @@ -589,20 +589,14 @@ isaac_seed (struct isaac_state *s) { #if HAVE_GETHRTIME hrtime_t t = gethrtime (); - ISAAC_SEED (s, t); -#else -# if HAVE_CLOCK_GETTIME /* POSIX ns-resolution */ +#elif HAVE_CLOCK_GETTIME /* POSIX ns-resolution */ struct timespec t; clock_gettime (CLOCK_REALTIME, &t); -# else -# if HAVE_GETTIMEOFDAY +#elif HAVE_GETTIMEOFDAY struct timeval t; gettimeofday (&t, (struct timezone *) 0); -# else - time_t t; - t = time (NULL); -# endif -# endif +#else + time_t t = time (NULL); #endif ISAAC_SEED (s, t); } |