diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-11-27 23:40:48 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-11-27 23:40:48 +0100 |
commit | 32ef0f5662bfe8b8891ba6341d3a27818fb55508 (patch) | |
tree | 2b3b522f13ce02cfd973f144539b75f3587d293d | |
parent | dcd6e771a1867353c14c46fc37e28d6d313cb3b1 (diff) |
stest: cleanup
-rw-r--r-- | stest.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -3,7 +3,6 @@ | |||
3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | #include <stdlib.h> | 5 | #include <stdlib.h> |
6 | #include <string.h> | ||
7 | #include <unistd.h> | 6 | #include <unistd.h> |
8 | #include <sys/stat.h> | 7 | #include <sys/stat.h> |
9 | 8 | ||
@@ -54,7 +53,7 @@ void | |||
54 | test(const char *path, const char *name) { | 53 | test(const char *path, const char *name) { |
55 | struct stat st, ln; | 54 | struct stat st, ln; |
56 | 55 | ||
57 | if(!stat(path, &st) && ( FLAG('a') || name[0] != '.') /* hidden files */ | 56 | if(!stat(path, &st) && (FLAG('a') || name[0] != '.') /* hidden files */ |
58 | && (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */ | 57 | && (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */ |
59 | && (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */ | 58 | && (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */ |
60 | && (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */ | 59 | && (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */ |