info: Use S_ISREG() instead of S_IFREG for readability

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2020-12-27 07:39:46 +01:00
parent 566b9fdbbe
commit 7b9e579408

View file

@ -145,7 +145,7 @@ info(void)
fclose(fp); fclose(fp);
return RET_FAIL; 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); pr("Error reading info file for %s\n", name);
logerror("The info file \"%s\" is not regular file\n", filename); logerror("The info file \"%s\" is not regular file\n", filename);
fclose(fp); fclose(fp);
@ -220,7 +220,7 @@ apro(void)
fclose(fp); fclose(fp);
continue; continue;
} }
if ((statb.st_mode & S_IFREG) == 0) { if (!S_ISREG(statb.st_mode)) {
logerror("The info file \"%s\" is not regular file\n", logerror("The info file \"%s\" is not regular file\n",
filename); filename);
fclose(fp); fclose(fp);