commit c306d5f0fc377e800d4e475587b5527c6fc8eee7
parent 54a3381da2970d7de60770bfe6933345b1a5fe19
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Wed, 8 Feb 2023 20:44:44 +0000
Fix exit status taken from pop_quit
The pop_quit function returns zero on success and non-zero on
failure, which is perfect for a program's exit status, yet it's
value was used after being negated, thus if pop_quit failed, the
exit status would be successful; if it succeeded, the opposite was
true. The result is now inverted a second time. (It isn't left as
is because, while it can only be 0 or 1 currently, it doesn't have
to in the future, and I want the exit status to be one of those
values.)
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pop3.c b/pop3.c
@@ -1,4 +1,4 @@
-/* $Id: pop3.c,v 1.7 2023/02/08 20:32:40 jacob Exp $ */
+/* $Id: pop3.c,v 1.8 2023/02/08 20:44:44 jacob Exp $ */
/*
* Copyright (c) 2022 Jacob R. Edwards
@@ -594,5 +594,5 @@ main(int argc, char *argv[])
die("unable to stat");
}
- return !pop_quit(fp);
+ return !!pop_quit(fp);
}