summaryrefslogtreecommitdiffstats
path: root/crypto/rand/randfile.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-03-19 19:10:03 +0000
committerRichard Levitte <levitte@openssl.org>2000-03-19 19:10:03 +0000
commit87b89b799f310bd5ab1dae343b0175f6dd9fd925 (patch)
treed78f5a44d6c1746def742f264ba94b04a8fd7d09 /crypto/rand/randfile.c
parentf3f3cc0ccaf528767942e6d151383209394cd7c4 (diff)
Make sure an error condition is returned if, for some reason, the file
couldn't be opened.
Diffstat (limited to 'crypto/rand/randfile.c')
-rw-r--r--crypto/rand/randfile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index 392efddb21..cc73c799fd 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -163,7 +163,11 @@ int RAND_write_file(const char *file)
out = fopen(file,"wb");
#endif
}
- if (out == NULL) goto err;
+ if (out == NULL)
+ {
+ err=1;
+ goto err;
+ }
#ifndef NO_CHMOD
chmod(file,0600);
#endif