From 7cae4b276ddb3b240464ffa90cdbeb43769ca5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 6 May 2025 07:13:38 +0200 Subject: [PATCH] tests: remove useless variable `rc` --- tests/fuzz/core/string-fuzzer.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/fuzz/core/string-fuzzer.c b/tests/fuzz/core/string-fuzzer.c index 19d0522e1..86fe59722 100644 --- a/tests/fuzz/core/string-fuzzer.c +++ b/tests/fuzz/core/string-fuzzer.c @@ -64,7 +64,6 @@ LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) const char *name; int argc, flags, num_tags, priority; regex_t regex; - int rc; str = (char *)malloc (size + 1); memcpy (str, data, size); @@ -136,13 +135,11 @@ LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) string_regex_flags (str, 0, NULL); string_regex_flags (str, 0, &flags); - rc = string_regcomp (®ex, str, REG_ICASE | REG_NOSUB); - if (rc == 0) + if (string_regcomp (®ex, str, REG_ICASE | REG_NOSUB) == 0) regfree (®ex); str2 = (char *)malloc (16 + size + 1); snprintf (str2, 16 + size + 1, "(?ins)%s", str); - rc = string_regcomp (®ex, str2, REG_ICASE | REG_NOSUB); - if (rc == 0) + if (string_regcomp (®ex, str2, REG_ICASE | REG_NOSUB) == 0) regfree (®ex); free (str2);