commit: dc589c8621613ea2eb39939547c3b50b02bc5630
parent bcef2914067aa920ea327bd06b006f62bd0c4f21
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 16 Dec 2024 23:41:28 +0100
cmd/strings: move endptr declaration out of switch block
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmd/strings.c b/cmd/strings.c
@@ -105,13 +105,14 @@ main(int argc, char *argv[])
int c;
while((c = getopt(argc, argv, ":an:t:z")) != -1)
{
+ char *endptr = NULL;
+
switch(c)
{
case 'a':
/* Structure is always ignored */
break;
case 'n':
- char *endptr = NULL;
opt_min_strlen = strtol(optarg, &endptr, 10);
if(endptr && *endptr != 0)
{