- Style corrections
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sun, 15 Mar 2015 17:40:51 +0000 (17:40 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sun, 15 Mar 2015 17:40:51 +0000 (17:40 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5699 82007160-df01-0410-b94d-b575c5fd34c7

src/firedns.c
src/scan.c

index bd6c5d8249d185c6a8c6d348036b10a739aaf397..8b2c896b5a7d45a16584804e7b7168aef5d0ea42 100644 (file)
@@ -816,7 +816,7 @@ firedns_cycle(void)
     ufds[size].fd = p->fd;
     ufds[size].events = POLLIN;
 
-    size++;
+    ++size;
   }
 
   switch (poll(ufds, size, 0))
@@ -826,13 +826,13 @@ firedns_cycle(void)
       return;
   }
 
-  LIST_FOREACH_SAFE(node, next, CONNECTIONS->head)
+  LIST_FOREACH_SAFE(node, node_next, CONNECTIONS->head)
   {
     p = node->data;
 
     if (p->fd > 0)
     {
-      for (i = 0; i < size; i++)
+      for (i = 0; i < size; ++i)
       {
         if ((ufds[i].revents & POLLIN) && ufds[i].fd == p->fd)
         {
index 8ea6e7e8682bf32e14afbe67c537558d0b960737..1f4004df4453bf9fb458be847154b367b9133866 100644 (file)
@@ -57,8 +57,8 @@
 
 /* GLOBAL LISTS */
 
-static list_t *SCANNERS = NULL;   /* List of OPM_T */
-static list_t *MASKS    = NULL;   /* Associative list of masks->scanners */
+static list_t *SCANNERS;  /* List of OPM_T */
+static list_t *MASKS;     /* Associative list of masks->scanners */
 
 
 /* Function declarations */
@@ -178,8 +178,6 @@ scan_init(void)
   struct ScannerConf *sc;
   struct ProtocolConf *pc;
   struct scanner_struct *scs;
-  char *mask;
-  char *scannername;
 
   /* FIXME: If rehash code is ever added, cleanup would need done here. */
 
@@ -248,14 +246,14 @@ scan_init(void)
 
       LIST_FOREACH(p3, uc->scanners->head)
       {
-        scannername = p3->data;
+        const char *scannername = p3->data;
 
         /* Add all these masks to scanner */
         if (strcasecmp(scannername, scs->name) == 0)
         {
           LIST_FOREACH(p4, uc->masks->head)
           {
-            mask = p4->data;
+            const char *mask = p4->data;
 
             if (OPT_DEBUG)
               log_printf("SCAN -> Linking the mask [%s] to scanner [%s]", mask, scannername);
@@ -302,7 +300,6 @@ scan_connect(const char *user[], const char *msg)
   node_t *p, *p2;
   struct scan_struct *ss;
   struct scanner_struct *scs;
-  char *scsmask;
   int ret;
 
   /*
@@ -364,7 +361,7 @@ scan_connect(const char *user[], const char *msg)
 
     LIST_FOREACH(p2, scs->masks->head)
     {
-      scsmask = p2->data;
+      const char *scsmask = p2->data;
 
       if (!match(scsmask, mask))
       {