From 93ba527924b3b060468df731d9f5cd0cc9664c18 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 3 Nov 2008 21:56:10 +0000 Subject: [PATCH] Fixed compiler errors and warnings in src/util/random.c where CONFIG_SSL undefined The patch also adds the name of the author of the patch to the contributor list. --- AUTHORS | 3 +++ src/util/random.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 0b4b5f15..866f0d70 100644 --- a/AUTHORS +++ b/AUTHORS @@ -456,6 +456,9 @@ Pavol Babincak Peder Stray Fix handling of key presses turning up as key prefixes +Peter Collingbourne + Fixed compiler errors and warnings in src/util/random.c where CONFIG_SSL undefined + Peter Gervai Manpage updates Mailcap to links.cfg convertor diff --git a/src/util/random.c b/src/util/random.c index 42c6611c..cb4f5e80 100644 --- a/src/util/random.c +++ b/src/util/random.c @@ -6,6 +6,7 @@ #endif #include +#include #include #include "elinks.h" @@ -95,7 +96,7 @@ random_nonce(unsigned char buf[], size_t size) if (!f) f = fopen("/dev/prandom", "rb"); /* OpenBSD */ if (f) { - i = fread(data, 1, length, f); + i = fread(buf, 1, size, f); fclose(f); }