From: Daniel Stenberg Date: Thu, 28 Mar 2024 12:11:11 +0000 (+0100) Subject: tool_xattr: in debug builds, act normally if CURL_FAKE_XATTR is not set X-Git-Tag: curl-8_8_0~338 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a15de6f785021e060d9ec30148891713a605c302;p=thirdparty%2Fcurl.git tool_xattr: in debug builds, act normally if CURL_FAKE_XATTR is not set Closes #13220 --- 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;