From b328eb8a73cf2788dd9fe33a1a65a44b824893bd Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 7 Sep 2011 12:25:52 +0000 Subject: [PATCH] remove unused code; evaluate returnvalues. --- citadel/citserver.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/citadel/citserver.c b/citadel/citserver.c index f0a2d3435..dd7b1ba2c 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -196,6 +196,9 @@ void master_startup(void) { urandom = fopen("/dev/urandom", "r"); if (urandom != NULL) { rv = fread(&seed, sizeof seed, 1, urandom); + if (rv == -1) + syslog(LOG_EMERG, "failed to read random seed: %s\n", + strerror(errno)); fclose(urandom); } else { @@ -887,9 +890,6 @@ void cmd_asyn(char *argbuf) */ void begin_session(CitContext *con) { - socklen_t len; - struct sockaddr_in sin; - /* * Initialize some variables specific to our context. */ @@ -914,7 +914,6 @@ void begin_session(CitContext *con) safestrncpy(con->cs_addr, "", sizeof con->cs_addr); con->cs_UDSclientUID = -1; con->cs_host[sizeof con->cs_host - 1] = 0; - len = sizeof sin; if (!CC->is_local_socket) { locate_host(con->cs_host, sizeof con->cs_host, con->cs_addr, sizeof con->cs_addr, -- 2.30.2