]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: halog: Remove dead stores
authorTim Duesterhus <tim@bastelstu.be>
Thu, 4 Nov 2021 20:04:24 +0000 (21:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Nov 2021 06:48:38 +0000 (07:48 +0100)
Found using clang's scan-build.

admin/halog/halog.c

index 900cf5d46c6a675128f1ee9a030076d173a7ca70..f368c1c6f48125c4d5304acb5896ba340a4f9d5a 100644 (file)
@@ -551,7 +551,8 @@ int convert_date_to_timestamp(const char *field)
        d = mo = y = h = m = s = 0;
        e = field;
 
-       c = *(e++); // remove '['
+       e++; // remove '['
+
        /* day + '/' */
        while (1) {
                c = *(e++) - '0';
@@ -1148,13 +1149,12 @@ int main(int argc, char **argv)
                /* sort all timers */
                for (f = 0; f < 5; f++) {
                        struct eb32_node *n;
-                       int val;
 
-                       val = 0;
                        n = eb32_first(&timers[f]);
                        while (n) {
                                int i;
                                double d;
+                               int val;
 
                                t = container_of(n, struct timer, node);
                                last = n->key;