summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-22 01:01:49 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-22 01:01:49 +0100
commit1b0c724855739a8a10275aa1d13586c7ec21bfb4 (patch)
treeb1982d26aa6574efdc3ed78b6b2ec2aae33f3c5f
parentb3bb9cce9a4dea9e8e4ab899042b3d9c9162cb5b (diff)
libfshelp-tests: Fix warning
* libfshelp-tests/test-fcntl.c (parse_args): Do not call error() with a NULL pointer.
-rw-r--r--libfshelp-tests/test-fcntl.c6
1 files changed, 3 insertions, 3 deletions
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);