info: Use S_ISREG() instead of S_IFREG for readability
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
e91b4e3b6e
commit
1ebee96036
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue