aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Sjölund <erik.sjolund@gmail.com>2023-10-02 19:36:08 +0200
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-10-08 07:42:30 +0800
commitc0b5c3d2a85bc13c7b92a6de3be16c60c2308a0e (patch)
tree1c8ca79aced07f93a7bc556a8fd08fdce458433d
parent8ee07437322862dbe631f04e817d8c371fd28ec6 (diff)
downloaderofs-utils-c0b5c3d2a85bc13c7b92a6de3be16c60c2308a0e.tar.gz
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 <hsiangkao@linux.alibaba.com>
-rw-r--r--lib/tar.c2
1 files changed, 1 insertions, 1 deletions
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;
}