From 1b0c724855739a8a10275aa1d13586c7ec21bfb4 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 22 Nov 2020 01:01:49 +0100 Subject: libfshelp-tests: Fix warning * libfshelp-tests/test-fcntl.c (parse_args): Do not call error() with a NULL pointer. --- libfshelp-tests/test-fcntl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libfshelp-tests') diff --git a/libfshelp-tests/test-fcntl.c b/libfshelp-tests/test-fcntl.c index 7495e7ab..f8c20804 100644 --- a/libfshelp-tests/test-fcntl.c +++ b/libfshelp-tests/test-fcntl.c @@ -143,7 +143,7 @@ int parse_args (int argc, char **argv, char **file_name, lock->l_start = tmp; } else - error (1, EINVAL, "%s", str); + error (1, EINVAL, "missing number"); continue; } if (strncmp (str, "l", 2) == 0) @@ -160,7 +160,7 @@ int parse_args (int argc, char **argv, char **file_name, lock->l_len = tmp; } else - error (1, EINVAL, "%s", str); + error (1, EINVAL, "missing number"); continue; } if (strncmp (str, "st", 2) == 0) @@ -177,7 +177,7 @@ int parse_args (int argc, char **argv, char **file_name, *sleep_time = tmp; } else - error (1, EINVAL, "%s", str); + error (1, EINVAL, "missing number"); continue; } error (1, EINVAL, "%s", str); -- cgit v1.2.3