From 6e611571c5cfd2202b6e09f92862b385b2d1e531 Mon Sep 17 00:00:00 2001 From: Blazej Michalik Date: Mon, 13 Apr 2020 02:03:04 +0200 Subject: [PATCH 1/2] is_complete: remove last two dead lines --- picohttpparser.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/picohttpparser.c b/picohttpparser.c index 74ccc3e..979d80f 100644 --- a/picohttpparser.c +++ b/picohttpparser.c @@ -217,9 +217,6 @@ static const char *is_complete(const char *buf, const char *buf_end, size_t last return buf; } } - - *ret = -2; - return NULL; } #define PARSE_INT(valp_, mul_) \ From 9a2c7855e7f09fb431b65c018c56305faa1a610c Mon Sep 17 00:00:00 2001 From: Blazej Michalik Date: Mon, 13 Apr 2020 02:14:12 +0200 Subject: [PATCH 2/2] is_complete: remove doubled EOF check EXPECT_CHAR already contains CHECK_EOF --- picohttpparser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/picohttpparser.c b/picohttpparser.c index 979d80f..b5778f6 100644 --- a/picohttpparser.c +++ b/picohttpparser.c @@ -203,7 +203,6 @@ static const char *is_complete(const char *buf, const char *buf_end, size_t last CHECK_EOF(); if (*buf == '\015') { ++buf; - CHECK_EOF(); EXPECT_CHAR('\012'); ++ret_cnt; } else if (*buf == '\012') {