From 6dd7b27ffca0f9d62d6333cd902f3207900b8429 Mon Sep 17 00:00:00 2001 From: Last G Date: Wed, 12 Sep 2012 23:59:03 +0600 Subject: [PATCH] Added right return values to non-void functions with "forever" loop to fix Eclipse static code analysis --- libhtp/htp/htp_request.c | 7 +++++++ libhtp/htp/htp_response.c | 8 ++++++++ libhtp/htp/htp_util.c | 1 + 3 files changed, 16 insertions(+) diff --git a/libhtp/htp/htp_request.c b/libhtp/htp/htp_request.c index 7de9f61fc1..27ecbd826f 100644 --- a/libhtp/htp/htp_request.c +++ b/libhtp/htp/htp_request.c @@ -99,6 +99,7 @@ int htp_connp_REQ_BODY_CHUNKED_DATA_END(htp_connp_t *connp) { return HTP_OK; } } + return HTP_ERROR; } /** @@ -151,6 +152,7 @@ int htp_connp_REQ_BODY_CHUNKED_DATA(htp_connp_t *connp) { } } } + return HTP_ERROR; } /** @@ -194,6 +196,7 @@ int htp_connp_REQ_BODY_CHUNKED_LENGTH(htp_connp_t *connp) { return HTP_OK; } } + return HTP_ERROR; } /** @@ -252,6 +255,7 @@ int htp_connp_REQ_BODY_IDENTITY(htp_connp_t *connp) { } } } + return HTP_ERROR; } /** @@ -525,6 +529,7 @@ int htp_connp_REQ_HEADERS(htp_connp_t *connp) { connp->in_header_line_counter++; } } + return HTP_ERROR; } /** @@ -710,6 +715,7 @@ int htp_connp_REQ_LINE(htp_connp_t *connp) { return HTP_OK; } } + return HTP_ERROR; } /** @@ -904,5 +910,6 @@ int htp_connp_req_data(htp_connp_t *connp, htp_time_t timestamp, unsigned char * return STREAM_STATE_ERROR; } } + return HTP_ERROR; } diff --git a/libhtp/htp/htp_response.c b/libhtp/htp/htp_response.c index da591f3404..0cc7e0e4ec 100644 --- a/libhtp/htp/htp_response.c +++ b/libhtp/htp/htp_response.c @@ -54,6 +54,8 @@ int htp_connp_RES_BODY_CHUNKED_DATA_END(htp_connp_t *connp) { return HTP_OK; } } + + return HTP_ERROR; } /** @@ -114,6 +116,7 @@ int htp_connp_RES_BODY_CHUNKED_DATA(htp_connp_t *connp) { } } } + return HTP_ERROR; } /** @@ -157,6 +160,7 @@ int htp_connp_RES_BODY_CHUNKED_LENGTH(htp_connp_t *connp) { return HTP_OK; } } + return HTP_ERROR; } /** @@ -247,6 +251,7 @@ int htp_connp_RES_BODY_IDENTITY(htp_connp_t *connp) { } } } + return HTP_ERROR; } /** @@ -552,6 +557,7 @@ int htp_connp_RES_HEADERS(htp_connp_t *connp) { connp->out_header_line_counter++; } } + return HTP_ERROR; } /** @@ -635,6 +641,7 @@ int htp_connp_RES_LINE(htp_connp_t *connp) { return HTP_OK; } } + return HTP_ERROR; } size_t htp_connp_res_data_consumed(htp_connp_t *connp) { @@ -836,5 +843,6 @@ int htp_connp_res_data(htp_connp_t *connp, htp_time_t timestamp, unsigned char * return STREAM_STATE_ERROR; } } + return HTP_ERROR; } diff --git a/libhtp/htp/htp_util.c b/libhtp/htp/htp_util.c index 42a68b8c10..8fac26b818 100644 --- a/libhtp/htp/htp_util.c +++ b/libhtp/htp/htp_util.c @@ -647,6 +647,7 @@ uint8_t bestfit_codepoint(htp_cfg_t *cfg, uint32_t codepoint) { // Move to the next triplet p += 3; } + return cfg->path_replacement_char; } /**