From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: "Erik Sjölund" <erik.sjolund@gmail.com>, linux-erofs@lists.ozlabs.org
Subject: Re: errno is set to a negative value in lib/tar.c
Date: Sun, 8 Oct 2023 08:09:52 +0800 [thread overview]
Message-ID: <aa0c0736-ecea-3834-0356-bc9560270223@linux.alibaba.com> (raw)
In-Reply-To: <ZR8D0ara6HGoH1aB@debian>
On 2023/10/6 02:43, Gao Xiang wrote:
> Hi Erik,
>
> On Mon, Oct 02, 2023 at 07:36:08PM +0200, Erik Sjölund wrote:
>> Hi,
>> Does this patch make sense?
>> (I thought errno should be set to a non-negative value)
>> Best regards,
>> Erik Sjölund
>
> Thanks for the patch.
>
> I'm on vacation, sorry for late reply. It looks good to me,
> I will address it when I'm back.
Since this is a one-line patch, I've applied this to -dev
directly. But in principle we need a proper Signed-off-by
tag at least..
Thanks,
Gao Xiang
>
> Thanks,
> Gao Xiang
>
>>
>> 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;
>> }
prev parent reply other threads:[~2023-10-08 0:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa0c0736-ecea-3834-0356-bc9560270223@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=erik.sjolund@gmail.com \
--cc=linux-erofs@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox