From 26b0c93f4d8be439bee4c5171b39a1897425e95e Mon Sep 17 00:00:00 2001 From: emma Date: Sat, 13 Jul 2024 17:04:38 -0600 Subject: [PATCH] strcmp(1): returns -1, specifies sysexits imports --- src/strcmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strcmp.c b/src/strcmp.c index b18f8c8..4b6bf3c 100644 --- a/src/strcmp.c +++ b/src/strcmp.c @@ -18,7 +18,7 @@ */ #include /* fprintf(3), stderr */ -#include +#include /* EX_OK, EX_USAGE */ static char *program_name = "strcmp"; @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) { if (*argv[i-1] > *argv[i]) { return 1; } else if (*argv[i-1] < *argv[i]++) { - return 255; + return -1; /* actually 255 */ } } }