Browse Source

Fix two compiler warnings

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2732 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.27
Stefan Bühler 12 years ago
parent
commit
a61e0bdde0
  1. 1
      NEWS
  2. 2
      src/data_string.c
  3. 4
      src/server.c

1
NEWS

@ -15,6 +15,7 @@ NEWS
* Include IP addresses on error log on password failures (fixes #2191)
* Fix stalls while reading from ssl sockets (fixes #2197)
* Fix etag formatting on boxes with 32-bit longs
* Fix two compiler warnings
- 1.4.26 - 2010-02-07
* Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105)

2
src/data_string.c

@ -69,8 +69,8 @@ static int data_response_insert_dup(data_unset *dst, data_unset *src) {
static void data_string_print(const data_unset *d, int depth) {
data_string *ds = (data_string *)d;
unsigned int i;
UNUSED(depth);
unsigned int i = 0;
/* empty and uninitialized strings */
if (ds->value->used < 1) {

4
src/server.c

@ -213,7 +213,9 @@ static server *server_init(void) {
if ((NULL != (frandom = fopen("/dev/urandom", "rb")) || NULL != (frandom = fopen("/dev/random", "rb")))
&& 1 == fread(srv->entropy, sizeof(srv->entropy), 1, frandom)) {
srand(*(unsigned int*)srv->entropy);
unsigned int e;
memcpy(&e, srv->entropy, sizeof(e) < sizeof(srv->entropy) ? sizeof(e) : sizeof(srv->entropy));
srand(e);
srv->is_real_entropy = 1;
} else {
unsigned int j;

Loading…
Cancel
Save