From ad864430b083d713803725337cf954fdd73f2abd Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 29 Dec 2023 00:45:54 +0100 Subject: check_http: Remove self assignment of a variable and add some comments --- plugins/check_http.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/check_http.c b/plugins/check_http.c index 110f1188..425ce86b 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -472,9 +472,8 @@ bool process_arguments (int argc, char **argv) http_method = strdup (optarg); char *tmp; if ((tmp = strstr(http_method, ":")) != NULL) { - tmp[0] = '\0'; - http_method = http_method; - http_method_proxy = ++tmp; + tmp[0] = '\0'; // set the ":" in the middle to 0 + http_method_proxy = ++tmp; // this points to the second part } break; case 'd': /* string or substring */ -- cgit v1.2.3-74-g34f1