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 diff --git a/plugins/check_http.c b/plugins/check_http.c index 110f118..425ce86 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 v0.10-9-g596f