From c0b5c3d2a85bc13c7b92a6de3be16c60c2308a0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Erik=20Sj=C3=B6lund?= Date: Mon, 2 Oct 2023 19:36:08 +0200 Subject: [PATCH] erofs-utils: errno shouldn't set to a negative value in lib/tar.c `errno` should be set to a non-negative value here. Link: https://lore.kernel.org/r/CAB+1q0Q3+7s1Lt8uW6DWZ7vfjhEKhG7O7MAQhCuH-C10cr9F4g@mail.gmail.com Signed-off-by: Gao Xiang --- lib/tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tar.c b/lib/tar.c index 0744972..8204939 100644 --- a/lib/tar.c +++ b/lib/tar.c @@ -241,7 +241,7 @@ static long long tarerofs_otoi(const char *ptr, int len) val = strtol(ptr, &endp, 8); if ((!val && endp == inp) | (*endp && *endp != ' ')) - errno = -EINVAL; + errno = EINVAL; return val; } -- 2.34.1