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 15:05:02 +0000 (15:05 +0000)
citadel/citserver.c

index 59e3514b422d8bca1c48ea2b93150d31f5da2a99..b15a56c55832ca6ed49361d0bbf83e1005f75181 100644 (file)
@@ -170,6 +170,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 {
@@ -861,9 +864,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.
         */
@@ -888,7 +888,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,