[Reconnoiter-devel] [reconnoiter commit] r1310 - trunk/src

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Tue May 25 21:39:33 EDT 2010


Author: jesus
Date: 2010-05-25 21:39:33 -0400 (Tue, 25 May 2010)
New Revision: 1310

Modified:
   trunk/src/noit_check.c
   trunk/src/noit_console_complete.c
   trunk/src/noit_console_state.c
   trunk/src/noit_console_telnet.c
   trunk/src/noit_http.c
   trunk/src/noit_listener.c
   trunk/src/noit_rest.c
   trunk/src/noitd.c
   trunk/src/stratcon_datastore.c
   trunk/src/stratcon_iep.c
   trunk/src/stratcon_jlog_streamer.c
   trunk/src/stratcond.c
Log:
dead assignments, refs #283

Modified: trunk/src/noit_check.c
===================================================================
--- trunk/src/noit_check.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noit_check.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -793,7 +793,7 @@
 static metric_type_t
 noit_metric_guess_type(const char *s, void **replacement) {
   char *copy, *cp, *trailer, *rpl;
-  int negative = 0, bigF = 0;
+  int negative = 0;
   metric_type_t type = METRIC_STRING;
 
   if(!s) return METRIC_GUESS;
@@ -865,7 +865,6 @@
    goto notanumber;
 
   exponent:
-   if(s[0] == 'E') bigF = 1; /* We want the caps variant */
    s++;
    if(s[0] != '-' && s[0] != '+') goto notanumber;
    s++;

Modified: trunk/src/noit_console_complete.c
===================================================================
--- trunk/src/noit_console_complete.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noit_console_complete.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -97,7 +97,7 @@
   noit_console_closure_t ncct;
   const LineInfo *li;
   char **cmds, *curstr;
-  int len, i, cnt = 32;
+  int len, cnt = 32;
 
   li = el_line(el);
   len = li->cursor - li->buffer;
@@ -106,7 +106,7 @@
   curstr[len] = '\0';
 
   cmds = alloca(32 * sizeof(*cmds));
-  i = noit_tokenize(curstr, cmds, &cnt);
+  (void) noit_tokenize(curstr, cmds, &cnt);
 
   el_get(el, EL_USERDATA, (void *)&ncct);
 

Modified: trunk/src/noit_console_state.c
===================================================================
--- trunk/src/noit_console_state.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noit_console_state.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -514,7 +514,7 @@
   current = ncct->state_stack;
 
   if(!argc) {
-    noit_console_state_stack_t *i = current;
+    noit_console_state_stack_t *i;
     if(!current) {
       nc_printf(ncct, "no state!\n");
       return -1;

Modified: trunk/src/noit_console_telnet.c
===================================================================
--- trunk/src/noit_console_telnet.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noit_console_telnet.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -1798,7 +1798,6 @@
 
 noit_console_telnet_closure_t
 noit_console_telnet_alloc(noit_console_closure_t ncct) {
-  int on;
   noit_console_telnet_closure_t telnet, tmp;
   static unsigned char ttytype_sbbuf[] = {
     IAC, SB, TELOPT_TTYPE, TELQUAL_SEND, IAC, SE
@@ -1825,7 +1824,6 @@
   }
   if (my_state_is_wont(TELOPT_ECHO))
     send_will(TELOPT_ECHO, 1);
-  on = 1;
   init_termbuf(ncct);
 #ifdef LINEMODE
   localstat(ncct);

Modified: trunk/src/noit_http.c
===================================================================
--- trunk/src/noit_http.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noit_http.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -1077,10 +1077,9 @@
     if(r) {
       r->next = n;
       n->prev = r;
-      r = n;
     }
     else {
-      r = ctx->res.output_raw = n;
+      ctx->res.output_raw = n;
     }
   }
 

Modified: trunk/src/noit_listener.c
===================================================================
--- trunk/src/noit_listener.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noit_listener.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -509,7 +509,6 @@
                   name, len);
        break;
       case AF_UNIX:
-        len = SUN_LEN(((struct sockaddr_un *)remote));
         snprintf(name, sizeof(name), "%s", ((struct sockaddr_un *)remote)->sun_path);
         break;
       default: return 0;

Modified: trunk/src/noit_rest.c
===================================================================
--- trunk/src/noit_rest.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noit_rest.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -395,7 +395,7 @@
                     int *mask, int *complete) {
   struct rest_xml_payload *rxc;
   if(restc->call_closure == NULL) {
-    rxc = restc->call_closure = calloc(1, sizeof(*rxc));
+    restc->call_closure = calloc(1, sizeof(*rxc));
     restc->call_closure_free = rest_xml_payload_free;
   }
   rxc = restc->call_closure;

Modified: trunk/src/noitd.c
===================================================================
--- trunk/src/noitd.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/noitd.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -347,7 +347,7 @@
 
   /* Reacquire the lock */
   if(*lockfile) {
-    if((lockfd = noit_lockfile_acquire(lockfile)) < 0) {
+    if(noit_lockfile_acquire(lockfile) < 0) {
       noitL(noit_stderr, "Failed to acquire lock: %s\n", lockfile);
       exit(-1);
     }

Modified: trunk/src/stratcon_datastore.c
===================================================================
--- trunk/src/stratcon_datastore.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/stratcon_datastore.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -264,7 +264,6 @@
 
   /* Force release these without holding the lock */
   while(cq) {
-    prev = cq;
     cq = cq->next;
     release_conn_q_forceable(cq, 1);
   }

Modified: trunk/src/stratcon_iep.c
===================================================================
--- trunk/src/stratcon_iep.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/stratcon_iep.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -247,7 +247,6 @@
   }
 
   /* Phase 4: clean the markings */
-  mgen = 0;
   memset(&iter, 0, sizeof(iter));
   while(noit_hash_next(&stmt_by_id, &iter, &key, &klen, &vstmt)) {
     stmt = vstmt;
@@ -441,7 +440,6 @@
                   remote_str, len);
        break;
       case AF_UNIX:
-        len = SUN_LEN(((struct sockaddr_un *)remote));
         snprintf(remote_str, sizeof(remote_str), "%s", ((struct sockaddr_un *)remote)->sun_path);
         break;
     }

Modified: trunk/src/stratcon_jlog_streamer.c
===================================================================
--- trunk/src/stratcon_jlog_streamer.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/stratcon_jlog_streamer.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -575,7 +575,6 @@
                  tmp_str, ntohs(nctx->r.remote_in6.sin6_port));
        break;
       case AF_UNIX:
-        len = SUN_LEN(&(nctx->r.remote_un));
         snprintf(remote_str, sizeof(remote_str), "%s", nctx->r.remote_un.sun_path);
         break;
       default:

Modified: trunk/src/stratcond.c
===================================================================
--- trunk/src/stratcond.c	2010-05-26 01:34:07 UTC (rev 1309)
+++ trunk/src/stratcond.c	2010-05-26 01:39:33 UTC (rev 1310)
@@ -173,7 +173,6 @@
 }
 
 static int child_main() {
-  int lockfd;
   char lockfile[PATH_MAX];
   char conf_str[1024];
   char user[32], group[32];
@@ -194,11 +193,10 @@
    * If we've started -D, we'll have the lock.
    * If not we will daemon and must reacquire the lock.
    */
-  lockfd = -1;
   lockfile[0] = '\0';
   if(noit_conf_get_stringbuf(NULL, "/" APPNAME "/@lockfile",
                              lockfile, sizeof(lockfile))) {
-    if((lockfd = noit_lockfile_acquire(lockfile)) < 0) {
+    if(noit_lockfile_acquire(lockfile) < 0) {
       noitL(noit_stderr, "Failed to acquire lock: %s\n", lockfile);
       exit(-1);
     }



More information about the Reconnoiter-devel mailing list