From a15de6f785021e060d9ec30148891713a605c302 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Mar 2024 13:11:11 +0100 Subject: [PATCH] tool_xattr: in debug builds, act normally if CURL_FAKE_XATTR is not set Closes #13220 --- src/tool_xattr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tool_xattr.c b/src/tool_xattr.c index 9472194faa..a6bd223c36 100644 --- a/src/tool_xattr.c +++ b/src/tool_xattr.c @@ -87,12 +87,11 @@ static int xattr(int fd, int err = 0; if(value) { #ifdef DEBUGBUILD - (void)fd; if(getenv("CURL_FAKE_XATTR")) { printf("%s => %s\n", attr, value); + return 0; } - return 0; -#else +#endif #ifdef HAVE_FSETXATTR_6 err = fsetxattr(fd, attr, value, strlen(value), 0, 0); #elif defined(HAVE_FSETXATTR_5) @@ -105,7 +104,6 @@ static int xattr(int fd, attribute */ err = (rc < 0 ? -1 : 0); } -#endif #endif } return err;