From 86292628e30bea51c0de0136a00837ca2bc8447c Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 10 Aug 2021 23:14:01 +0300 Subject: [PATCH] test: fix checking test args for http_parse_uri_test --- test/regress_http.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/regress_http.c b/test/regress_http.c index a9c990b2..c5e5de59 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -2932,12 +2932,14 @@ end: } static void -http_parse_uri_test(void *ptr) +http_parse_uri_test(void *arg) { int nonconform = 0, unixsock = 0; int parse_flags = 0; struct evhttp_uri *uri = NULL; char url_tmp[4096]; + struct basic_test_data *data = arg; + const char *setup_data = data ? data->setup_data : NULL; #define URI_PARSE_FLAGS(uri, flags) \ evhttp_uri_parse_with_flags((uri), flags) #define URI_PARSE(uri) \ @@ -2951,12 +2953,12 @@ http_parse_uri_test(void *ptr) TT_FAIL(("\"%s\" != \"%s\"",ret,want)); \ } while(0) - if (ptr) { - if (strstr(ptr, "nc") != NULL) { + if (setup_data) { + if (strstr(setup_data, "nc") != NULL) { nonconform = 1; parse_flags |= EVHTTP_URI_NONCONFORMANT; } - if (strstr(ptr, "un") != NULL) { + if (strstr(setup_data, "un") != NULL) { unixsock = 1; parse_flags |= EVHTTP_URI_UNIX_SOCKET; } -- 2.50.1