[PATCH 1/4] unlink_recursive: return negative error value
Sascha Hauer
s.hauer at pengutronix.de
Wed Apr 9 00:39:23 PDT 2014
In case of an error unlink_recursive returns errno which is positive.
Return -errno instead.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
lib/unlink-recursive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/unlink-recursive.c b/lib/unlink-recursive.c
index 8f7812f..78dc015 100644
--- a/lib/unlink-recursive.c
+++ b/lib/unlink-recursive.c
@@ -53,5 +53,5 @@ int unlink_recursive(const char *path, char **failedpath)
if (!ret && failedpath)
*failedpath = unlink_recursive_failedpath;
- return ret ? 0 : errno;
+ return ret ? 0 : -errno;
}
--
1.9.1
More information about the barebox
mailing list