aboutsummaryrefslogtreecommitdiffstats
path: root/xtest.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-22 12:54:48 +0100
committerMattias Andrée <m@maandree.se>2026-02-22 12:54:48 +0100
commit6a1923f36ffef608e99dfc217e83f10d2741a909 (patch)
treeffb18a2acd1b37f54e817f4ca91fac7b057cd0db /xtest.c
parentUpdate e-mail (diff)
downloadxtest-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xtest.c b/xtest.c
index 7a45089..895ced3 100644
--- a/xtest.c
+++ b/xtest.c
@@ -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); }