diff options
| author | Mattias Andrée <m@maandree.se> | 2026-02-22 12:54:48 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-02-22 12:54:48 +0100 |
| commit | 6a1923f36ffef608e99dfc217e83f10d2741a909 (patch) | |
| tree | ffb18a2acd1b37f54e817f4ca91fac7b057cd0db /xtest.c | |
| parent | Update e-mail (diff) | |
| download | xtest-6a1923f36ffef608e99dfc217e83f10d2741a909.tar.gz xtest-6a1923f36ffef608e99dfc217e83f10d2741a909.tar.bz2 xtest-6a1923f36ffef608e99dfc217e83f10d2741a909.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | xtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -24,7 +24,7 @@ static int test_h(char *s) { struct stat buf; if (lstat(s, &buf)) return 0; retu static int test_k(char *s) { struct stat buf; if ( stat(s, &buf)) return 0; return S_ISVTX & buf.st_mode ; } static int test_p(char *s) { struct stat buf; if ( stat(s, &buf)) return 0; return S_ISFIFO (buf.st_mode); } static int test_S(char *s) { struct stat buf; if ( stat(s, &buf)) return 0; return S_ISSOCK (buf.st_mode); } -static int test_s(char *s) { struct stat buf; if ( stat(s, &buf)) return 0; return buf.st_size ; } +static int test_s(char *s) { struct stat buf; if ( stat(s, &buf)) return 0; return !!buf.st_size ; } static int test_u(char *s) { struct stat buf; if ( stat(s, &buf)) return 0; return S_ISUID & buf.st_mode ; } static int test_e(char *s) { return !faccessat(AT_FDCWD, s, F_OK, AT_EACCESS); } |
