From adc9dbded5401bb05538d1b2dec8b20b3c2200f3 Mon Sep 17 00:00:00 2001 From: DTB Date: Fri, 26 Apr 2024 19:30:33 -0600 Subject: [PATCH] scrut(1): changed return status 1 to EXIT_FAILURE --- src/scrut.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scrut.c b/src/scrut.c index 8d0d393..025b743 100644 --- a/src/scrut.c +++ b/src/scrut.c @@ -17,7 +17,7 @@ */ #include /* fprintf(3), stderr, NULL */ -#include /* EXIT_FAILURE */ +#include /* EXIT_FAILURE, EXIT_SUCCESS */ #include /* memset(3), strchr(3) */ #include /* access(3), getopt(3), F_OK, R_OK, W_OK, X_OK */ #include /* lstat(3), stat struct, S_ISBLK, S_ISCHR, S_ISDIR, @@ -57,7 +57,7 @@ int main(int argc, char *argv[]){ argv += optind; do{ if(access(*argv, F_OK) != 0 || lstat(*argv, &buf) == -1) - return 1; /* doesn't exist or isn't stattable */ + return EXIT_FAILURE; /* doesn't exist or isn't stattable */ for(i = 0; ops[i] != '\0'; ++i) if(ops[i] == 'e') @@ -97,7 +97,7 @@ usage: fprintf(stderr, "Usage: %s (-%s) [file...]\n", && !S_ISLNK(buf.st_mode)) || (ops[i] == 'S' && !S_ISSOCK(buf.st_mode))) - return 1; + return EXIT_FAILURE; }while(*++argv != NULL); return EXIT_SUCCESS;