summaryrefslogtreecommitdiffstats
path: root/apps/rand.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2003-10-29 21:24:15 +0100
committerGeoff Thorpe <geoff@openssl.org>2003-10-29 21:24:15 +0100
commit27545970134d703ed96027aac9b67eced124eec3 (patch)
tree2f878acf303cc26e3b6db6a0ec25c10c91e3d32d /apps/rand.c
parentBN_CTX is opaque and the static initialiser BN_CTX_init() is not used (diff)
downloadopenssl-27545970134d703ed96027aac9b67eced124eec3.tar.xz
openssl-27545970134d703ed96027aac9b67eced124eec3.zip
A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
Diffstat (limited to 'apps/rand.c')
-rw-r--r--apps/rand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/rand.c b/apps/rand.c
index 63724bc730..a893896033 100644
--- a/apps/rand.c
+++ b/apps/rand.c
@@ -205,7 +205,7 @@ int MAIN(int argc, char **argv)
int chunk;
chunk = num;
- if (chunk > sizeof buf)
+ if (chunk > (int)sizeof(buf))
chunk = sizeof buf;
r = RAND_bytes(buf, chunk);
if (r <= 0)