summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-04-08 17:17:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-04-09 09:36:34 +0200
commit00e4664675d3215c5e5421eaa73195b27be7ba9e (patch)
tree082168513e4a6d5757c22d3f614895c424bc312a
parent7b8779541f86bbc6f6b461f1ea1c2f4310bb8335 (diff)
downloadbarebox-00e4664675d3215c5e5421eaa73195b27be7ba9e.tar.gz
unlink_recursive: return negative error value
In case of an error unlink_recursive returns errno which is positive. Return -errno instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--lib/unlink-recursive.c2
1 files changed, 1 insertions, 1 deletions
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;
}