From: Markus Armbruster Date: Sun, 27 Dec 2020 06:39:46 +0000 (+0100) Subject: info: Use S_ISREG() instead of S_IFREG for readability X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=1ebee960369e440400ba5cc6769614e62c59700a info: Use S_ISREG() instead of S_IFREG for readability Signed-off-by: Markus Armbruster --- diff --git a/src/lib/commands/info.c b/src/lib/commands/info.c index cd9d4a008..961ad606b 100644 --- a/src/lib/commands/info.c +++ b/src/lib/commands/info.c @@ -145,7 +145,7 @@ info(void) fclose(fp); return RET_FAIL; } - if ((statb.st_mode & S_IFREG) == 0) { + if (!S_ISREG(statb.st_mode)) { pr("Error reading info file for %s\n", name); logerror("The info file \"%s\" is not regular file\n", filename); fclose(fp); @@ -220,7 +220,7 @@ apro(void) fclose(fp); continue; } - if ((statb.st_mode & S_IFREG) == 0) { + if (!S_ISREG(statb.st_mode)) { logerror("The info file \"%s\" is not regular file\n", filename); fclose(fp);