projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e84c2d2
)
Under VMS, ftruncate should be available
author
Bodo Möller
<bodo@openssl.org>
Sun, 23 Jan 2000 22:02:34 +0000
(22:02 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Sun, 23 Jan 2000 22:02:34 +0000
(22:02 +0000)
crypto/rand/randfile.c
patch
|
blob
|
history
diff --git
a/crypto/rand/randfile.c
b/crypto/rand/randfile.c
index 1882d7df2cb4a6c683f764a0dac8c77facaa1637..375c339e5c3c6b5776f44afafa5e0a09754cd9ab 100644
(file)
--- a/
crypto/rand/randfile.c
+++ b/
crypto/rand/randfile.c
@@
-162,6
+162,13
@@
int RAND_write_file(const char *file)
ret+=i;
if (n <= 0) break;
}
+#ifdef VMS
+ /* We may have updated an existing file using mode "rb+",
+ * now remove any old extra bytes */
+ if (ret > 0)
+ ftruncate(fileno(out), ret);
+#endif
+
fclose(out);
memset(buf,0,BUFSIZE);
err: