remove unused code; evaluate returnvalues.
authorWilfried Goesgens <dothebart@citadel.org>
Wed, 7 Sep 2011 12:25:52 +0000 (12:25 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Wed, 7 Sep 2011 12:25:52 +0000 (12:25 +0000)
citadel/citserver.c

index f0a2d343555395dacac35e0765de2f62cbe9bd5d..dd7b1ba2c0bedb282f5a1f91c00debf6fc4640eb 100644 (file)
@@ -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,