[PATCH 1/4] unlink_recursive: return negative error value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case of an error unlink_recursive returns errno which is positive.
Return -errno instead.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux