All of lore.kernel.org
 help / color / mirror / Atom feed
* errno is set to a negative value in lib/tar.c
@ 2023-10-02 17:36 Erik Sjölund
  2023-10-05 18:43 ` Gao Xiang
  0 siblings, 1 reply; 3+ messages in thread
From: Erik Sjölund @ 2023-10-02 17:36 UTC (permalink / raw)
  To: linux-erofs

Hi,
Does this patch make sense?
(I thought errno should be set to a non-negative value)
Best regards,
Erik Sjölund

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;
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-08  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 17:36 errno is set to a negative value in lib/tar.c Erik Sjölund
2023-10-05 18:43 ` Gao Xiang
2023-10-08  0:09   ` Gao Xiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.