]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
defrag: pass u64 to ParseU64
authorVictor Julien <victor@inliniac.net>
Wed, 11 Dec 2013 08:35:41 +0000 (09:35 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 12 Dec 2013 14:59:57 +0000 (15:59 +0100)
Fixes: defrag-config.c:97: warning: passing argument 2 \
       of 'ParseSizeStringU64' from incompatible pointer type

src/defrag-config.c

index 69553a0d0ced6aaf7b039a35432849cd823ffca1..b17d6d0e3279c4e0bd98938c7d456fcd38382a46 100644 (file)
@@ -89,23 +89,23 @@ int DefragPolicyGetHostTimeout(Packet *p)
 static void DefragParseParameters(ConfNode *n)
 {
     ConfNode *si;
-    uintmax_t timeout = 0;
+    uint64_t timeout = 0;
 
     TAILQ_FOREACH(si, &n->head, next) {
         if (strcasecmp("timeout", si->name) == 0) {
-                SCLogDebug("timeout value  %s", si->val);
-                if (ParseSizeStringU64(si->val, &timeout) < 0) {
-                    SCLogError(SC_ERR_SIZE_PARSE, "Error parsing timeout "
-                               "from conf file");
-                }
+            SCLogDebug("timeout value  %s", si->val);
+            if (ParseSizeStringU64(si->val, &timeout) < 0) {
+                SCLogError(SC_ERR_SIZE_PARSE, "Error parsing timeout "
+                        "from conf file");
             }
-            if (strcasecmp("address", si->name) == 0) {
-                ConfNode *pval;
-                TAILQ_FOREACH(pval, &si->head, next) {
-                    DefragPolicyAddHostInfo(pval->val, &timeout);
-                }
+        }
+        if (strcasecmp("address", si->name) == 0) {
+            ConfNode *pval;
+            TAILQ_FOREACH(pval, &si->head, next) {
+                DefragPolicyAddHostInfo(pval->val, &timeout);
             }
         }
+    }
 }
 
 void DefragSetDefaultTimeout(intmax_t timeout)