From 1ebee960369e440400ba5cc6769614e62c59700a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 27 Dec 2020 07:39:46 +0100 Subject: [PATCH] info: Use S_ISREG() instead of S_IFREG for readability Signed-off-by: Markus Armbruster --- src/lib/commands/info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.43.0