[hackers] [dmenu] stest: remove unneeded lstat || Connor Lane Smith
changeset: 470:8656fc4a34ee
branch: stest
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Sun Nov 27 23:37:01 2011 +0100
files: stest.c
description:
stest: remove unneeded lstat
diff -r a2258a6ec485 -r 8656fc4a34ee stest.c
--- a/stest.c Sun Nov 27 23:35:09 2011 +0100
+++ b/stest.c Sun Nov 27 23:37:01 2011 +0100
_AT_@ -54,8 +54,7 @@
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 */
Received on Sun Nov 27 2011 - 23:37:24 CET
This archive was generated by hypermail 2.3.0
: Sun Nov 27 2011 - 23:48:07 CET