Xinqi Bao's Git
projects
/
dmenu.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(parent:
8cc28cb
)
stest: remove unneeded lstat
author
Connor Lane Smith <
[email protected]
>
Sun, 27 Nov 2011 22:37:01 +0000
(23:37 +0100)
committer
Connor Lane Smith <
[email protected]
>
Sun, 27 Nov 2011 22:37:01 +0000
(23:37 +0100)
stest.c
diff
|
blob
|
history
diff --git
a/stest.c
b/stest.c
index
e75d321
..
9dbf9c1
100644
(file)
--- a/
stest.c
+++ b/
stest.c
@@
-54,8
+54,7
@@
void
test(const char *path, const char *name) {
struct stat st, ln;
- if(!stat(path, &st) && !lstat(path, &ln)
- && ( FLAG('a') || name[0] != '.') /* hidden */
+ if(!stat(path, &st) && ( FLAG('a') || name[0] != '.') /* hidden files */
&& (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */
&& (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */
&& (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */