aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mk-tdata.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-05-24 18:38:35 +0000
committerDavid Shaw <[email protected]>2003-05-24 18:38:35 +0000
commitea35e3b65f5e741ce2feebd53831681f9e807884 (patch)
tree43d449ca34f21b926a5233000897bc3cc5d8bfcd /tools/mk-tdata.c
parent* bithelp.h, des.c, random.c, rndlinux.c, sha1.c, blowfish.c, elgamal.c, (diff)
downloadgnupg-ea35e3b65f5e741ce2feebd53831681f9e807884.tar.gz
gnupg-ea35e3b65f5e741ce2feebd53831681f9e807884.zip
* bftest.c, crlf.c, mk-tdata.c, mpicalc.c, shmtest.c: Edit all
preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it.
Diffstat (limited to '')
-rw-r--r--tools/mk-tdata.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/mk-tdata.c b/tools/mk-tdata.c
index dcfa859f1..868e0ffbf 100644
--- a/tools/mk-tdata.c
+++ b/tools/mk-tdata.c
@@ -17,7 +17,7 @@
#ifndef RAND_MAX /* for SunOS */
- #define RAND_MAX 32767
+#define RAND_MAX 32767
#endif
int
@@ -31,13 +31,12 @@ main(int argc, char **argv)
srand(getpid());
for(i=0; !limit || i < limit; i++ ) {
- #ifdef HAVE_RAND
+#ifdef HAVE_RAND
c = ((unsigned)(1 + (int) (256.0*rand()/(RAND_MAX+1.0)))-1);
- #else
+#else
c = ((unsigned)(1 + (int) (256.0*random()/(RAND_MAX+1.0)))-1);
- #endif
+#endif
putchar(c);
}
return 0;
}
-