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>
This commit is contained in:
parent
7b8779541f
commit
00e4664675
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue