stest: cleanup
32ef0f56
1 file(s) · +1 −2
| 3 | 3 | #include <stdbool.h> |
|
| 4 | 4 | #include <stdio.h> |
|
| 5 | 5 | #include <stdlib.h> |
|
| 6 | - | #include <string.h> |
|
| 7 | 6 | #include <unistd.h> |
|
| 8 | 7 | #include <sys/stat.h> |
|
| 9 | 8 | ||
| 54 | 53 | test(const char *path, const char *name) { |
|
| 55 | 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 | 57 | && (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */ |
|
| 59 | 58 | && (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */ |
|
| 60 | 59 | && (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */ |
|