lib/, src/: getulong(): Use the usual -1 as an error code

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2023-12-01 20:33:20 +01:00
committed by Serge Hallyn
parent 2d581cb337
commit 2a9b6d80e7
9 changed files with 23 additions and 26 deletions
+2 -2
View File
@@ -324,7 +324,7 @@ int main (int argc, char **argv)
case 'b':
{
unsigned long inverse_days;
if (getulong (optarg, &inverse_days) == 0) {
if (getulong(optarg, &inverse_days) == -1) {
fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);
@@ -352,7 +352,7 @@ int main (int argc, char **argv)
case 't':
{
unsigned long days;
if (getulong (optarg, &days) == 0) {
if (getulong(optarg, &days) == -1) {
fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);