From 6a1923f36ffef608e99dfc217e83f10d2741a909 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 22 Feb 2026 12:54:48 +0100 Subject: m fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- xtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xtest.c') 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); } -- cgit v1.2.3-70-g09d2