From cf9230659e8d64e95209a4d57cbda8a474049ddb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 17 May 2024 16:10:00 -0400 Subject: Cast AT_FDCWD to int for comparisons Some platforms define AT_FDCWD to a constant like 0xFFFAFDCD that gets typed as an unsigned int. --- tests/xtouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/xtouch.c') diff --git a/tests/xtouch.c b/tests/xtouch.c index cd41842..427e3e0 100644 --- a/tests/xtouch.c +++ b/tests/xtouch.c @@ -120,7 +120,7 @@ static int at_flags(const struct args *args) { /** Touch one path. */ static int xtouch(const struct args *args, const char *path) { int dfd = open_parent(args, &path); - if (dfd < 0 && dfd != AT_FDCWD) { + if (dfd < 0 && dfd != (int)AT_FDCWD) { return -1; } -- cgit v1.2.3