fix POSIX 2002 C

This commit is contained in:
Nick Chan committed 2023-03-25 13:40:45 +08:00
1 parent 03e6739bc9
commit 2d932dd26b
1 file changed
+1 -1
+1 -1
View File
@@ -213,7 +213,7 @@ int optparse(int argc, char* argv[]) {
} else if (!(st.st_mode & S_IXUSR) && !(st.st_mode & S_IXGRP) && !(st.st_mode & S_IXOTH)) {
LOG(LOG_FATAL, "%s is not executable", optarg);
return -1;
} else if (!(st.st_mode & S_IFREG)) {
} else if (!S_ISREG(st.st_mode)) {
LOG(LOG_FATAL, "%s is not a regular file", optarg);
return -1;
}