1
0
Fork 0

stest: remove unneeded lstat

This commit is contained in:
Connor Lane Smith 2011-11-27 23:37:01 +01:00
parent 8cc28cb426
commit dcd6e771a1

View file

@ -54,8 +54,7 @@ void
test(const char *path, const char *name) { test(const char *path, const char *name) {
struct stat st, ln; struct stat st, ln;
if(!stat(path, &st) && !lstat(path, &ln) if(!stat(path, &st) && ( FLAG('a') || name[0] != '.') /* hidden files */
&& ( FLAG('a') || name[0] != '.') /* hidden */
&& (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */ && (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */
&& (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */ && (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */
&& (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */ && (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */