]> granicus.if.org Git - curl/commitdiff
curl: follow-up to b49652ac66cc0
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Feb 2019 11:17:31 +0000 (12:17 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Feb 2019 11:17:31 +0000 (12:17 +0100)
On FreeBSD, return non-zero on error otherwise zero.

Reported-by: Marcel Raad
src/tool_xattr.c

index be5f024a6a19d4410b0f8b9e6a752965896730a2..7cc42e0f11b7dbe7c7b8f2653d5e74813b0dbde6 100644 (file)
@@ -116,7 +116,7 @@ int fwrite_xattr(CURL *curl, int fd)
                                       mappings[i].attr, value, strlen(value));
           /* FreeBSD's extattr_set_fd returns the length of the extended
              attribute */
-          err = (int)rc;
+          err = (rc < 0 : -1 : 0);
         }
 #endif
         if(freeptr)