From d9dd4e60571292b32f7aa94b7bc6b0e01e6ed638 Mon Sep 17 00:00:00 2001 From: emma Date: Sat, 13 Jul 2024 16:57:52 -0600 Subject: [PATCH] intcmp(1): formatting, lists sysexits imports, allows no args --- src/intcmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intcmp.c b/src/intcmp.c index ce4a5e0..961b8a9 100644 --- a/src/intcmp.c +++ b/src/intcmp.c @@ -21,7 +21,7 @@ #include /* fprintf(3), stderr */ #include /* strtol(3), size_t, EXIT_FAILURE */ #include /* getopt(3), optind */ -#include +#include /* EX_OK, EX_USAGE */ /* 0b00? */ /* Equal | -e | 0b001 | 1 */ #define EQUAL 0x01 /* Greater | -g | 0b010 | 2 */ @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) { mode = 0; - if(argc < 3) { return usage(argv[0]); } + if (argc == 0 | argc < 3) { return usage(argv[0]); } while ((c = getopt(argc, argv, "egl")) != -1) { switch(c){