summaryrefslogtreecommitdiffstats
path: root/apps/rand.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2009-02-02 01:40:29 +0100
committerBodo Möller <bodo@openssl.org>2009-02-02 01:40:29 +0100
commitd615bceb2d56a88da6fbee418f1650ac3fe3435c (patch)
treede72b14f24a2ed994e936841d178520205f4432b /apps/rand.c
parent-hex option for openssl rand (diff)
downloadopenssl-d615bceb2d56a88da6fbee418f1650ac3fe3435c.tar.xz
openssl-d615bceb2d56a88da6fbee418f1650ac3fe3435c.zip
For -hex, print just one \n
Diffstat (limited to 'apps/rand.c')
-rw-r--r--apps/rand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/rand.c b/apps/rand.c
index 7214a9d2a8..44a1d46a03 100644
--- a/apps/rand.c
+++ b/apps/rand.c
@@ -229,10 +229,11 @@ int MAIN(int argc, char **argv)
{
for (i = 0; i < chunk; i++)
BIO_printf(out, "%02x", buf[i]);
- BIO_puts(out, "\n");
}
num -= chunk;
}
+ if (hex)
+ BIO_puts(out, "\n");
(void)BIO_flush(out);
app_RAND_write_file(NULL, bio_err);