diff options
| author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-12-29 00:45:54 +0100 |
|---|---|---|
| committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-12-29 00:45:54 +0100 |
| commit | ad864430b083d713803725337cf954fdd73f2abd (patch) | |
| tree | 510d2bf1fbe301796799f421e263deda750acddd | |
| parent | c1c9abbfcafe8e55d86dfe13aed6874ad194d761 (diff) | |
| download | monitoring-plugins-ad864430b083d713803725337cf954fdd73f2abd.tar.gz | |
check_http: Remove self assignment of a variable and add some comments
| -rw-r--r-- | plugins/check_http.c | 5 |
1 files changed, 2 insertions, 3 deletions
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) | |||
| 472 | http_method = strdup (optarg); | 472 | http_method = strdup (optarg); |
| 473 | char *tmp; | 473 | char *tmp; |
| 474 | if ((tmp = strstr(http_method, ":")) != NULL) { | 474 | if ((tmp = strstr(http_method, ":")) != NULL) { |
| 475 | tmp[0] = '\0'; | 475 | tmp[0] = '\0'; // set the ":" in the middle to 0 |
| 476 | http_method = http_method; | 476 | http_method_proxy = ++tmp; // this points to the second part |
| 477 | http_method_proxy = ++tmp; | ||
| 478 | } | 477 | } |
| 479 | break; | 478 | break; |
| 480 | case 'd': /* string or substring */ | 479 | case 'd': /* string or substring */ |
