From f83aa2272be09e61821b0d6dfb6f24cb33b4b6e3 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Sat, 4 Oct 2025 21:51:26 +0100 Subject: [PATCH] Fix incorrect usage of "optarg". --- src/main/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/options.c b/src/main/options.c index 4459073..13f27ed 100644 --- a/src/main/options.c +++ b/src/main/options.c @@ -35,7 +35,7 @@ void display_help(void); void display_version(void); -static bool opts_watchfd_parse(opts_t, const char *optarg, /*@null@ */ const char *, unsigned int); +static bool opts_watchfd_parse(opts_t, const char *, /*@null@ */ const char *, unsigned int); /* @@ -384,7 +384,7 @@ static bool opts_watchfd_parse(opts_t opts, const char *argument, /*@null@ */ co parse_pid = 0; parse_fd = -1; - if (sscanf(optarg, "%u:%d", &parse_pid, &parse_fd) < 1) { + if (sscanf(argument, "%u:%d", &parse_pid, &parse_fd) < 1) { /*@-mustfreefresh@ *//* see above */ if (NULL != filename) { fprintf(stderr, "%s: -d: %s:%u: %s\n",