Code

collectdctl: Fix comparison with uninitialized variable.
authorFlorian Forster <octo@huhu.verplant.org>
Wed, 18 Aug 2010 08:22:11 +0000 (10:22 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 18 Aug 2010 08:23:37 +0000 (10:23 +0200)
src/collectdctl.c

index 60b1e64e6205da368dd9a74c27bfb0056235b2c8..fe118816ce7cbf55d876dd569a162bbf9b09a3dd 100644 (file)
@@ -443,7 +443,7 @@ static int putval (lcc_connection_t *c, int argc, char **argv)
 
         vl.time = strtol (argv[i], &endptr, 0);
 
-        if (endptr == value) {
+        if (endptr == argv[i]) {
           fprintf (stderr, "ERROR: Failed to parse time as number: %s.\n",
               argv[i]);
           return (-1);