From 15b1f93903e0ba1aa1733afd509183ba761e0683 Mon Sep 17 00:00:00 2001 From: Hatsumi-FR Date: Sun, 3 Dec 2023 14:11:19 +0100 Subject: [PATCH] Fix "make" error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Variable 'tmp' was moved to a higher scope in the parse_options function of hydra-http-form.c. This change was necessary to prevent duplicate declarations in the different switch case blocks. This PR fix "make" error : error: redefinition of ‘tmp’ --- hydra-http-form.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hydra-http-form.c b/hydra-http-form.c index b6f888eb..26c2d29a 100644 --- a/hydra-http-form.c +++ b/hydra-http-form.c @@ -390,7 +390,7 @@ char *stringify_headers(ptr_header_node *ptr_head) { } int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) { - char *ptr, *ptr2; + char *ptr, *ptr2, *tmp; if (miscptr == NULL) return 1; @@ -440,7 +440,7 @@ int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) { break; case '1': code_401_is_failure = 1; - char *tmp = strchr(miscptr, ':'); + *tmp = strchr(miscptr, ':'); if (tmp) miscptr = tmp + 1; else @@ -448,7 +448,7 @@ int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) { break; case '2': code_302_is_success = 1; - char *tmp = strchr(miscptr, ':'); + *tmp = strchr(miscptr, ':'); if (tmp) miscptr = tmp + 1; else