]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: config: slowstart is never negative
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2013 15:24:15 +0000 (16:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2013 15:24:15 +0000 (16:24 +0100)
No need to check for a negative value in the "slowstart" argument, it's
an unsigned.

Reported-by: Dinko Korunic <dkorunic@reflected.net>
src/cfgparse.c

index dd89c9472be98b549bd1a17db3c580ae2eed095b..5b8fc0697f1015bfee9b0b3acc811d7147ecc69f 100644 (file)
@@ -4275,12 +4275,6 @@ stats_error_parsing:
                                        err_code |= ERR_ALERT | ERR_FATAL;
                                        goto out;
                                }
-                               if (val < 0) {
-                                       Alert("parsing [%s:%d]: invalid value %d for argument '%s' of server %s.\n",
-                                             file, linenum, val, args[cur_arg], newsrv->id);
-                                       err_code |= ERR_ALERT | ERR_FATAL;
-                                       goto out;
-                               }
                                newsrv->slowstart = (val + 999) / 1000;
                                cur_arg += 2;
                        }