]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: http: Remove unreachable code in parse_http_req_capture
authorTim Duesterhus <tim@bastelstu.be>
Tue, 26 Feb 2019 16:09:50 +0000 (17:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 Feb 2019 16:27:04 +0000 (17:27 +0100)
`len` has already been checked to be strictly positive a few lines above.

This unreachable code was introduced in 82bf70dff4eff42397fecfcb9e97a0a7ce721c49.

src/http_act.c

index 4f51d4a2ed58b9c0d69151c8927c13548db131e3..0346be0cb64abdd9b4d7c0d085715b90ddb98d87 100644 (file)
@@ -375,12 +375,6 @@ static enum act_parse_ret parse_http_req_capture(const char **args, int *orig_ar
                }
                cur_arg++;
 
-               if (!len) {
-                       memprintf(err, "a positive 'len' argument is mandatory");
-                       free(expr);
-                       return ACT_RET_PRS_ERR;
-               }
-
                hdr = calloc(1, sizeof(*hdr));
                hdr->next = px->req_cap;
                hdr->name = NULL; /* not a header capture */