Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <xiang@kernel.org>
To: "Erik Sjölund" <erik.sjolund@gmail.com>
Cc: linux-erofs@lists.ozlabs.org
Subject: Re: errno is set to a negative value in lib/tar.c
Date: Fri, 6 Oct 2023 02:43:29 +0800	[thread overview]
Message-ID: <ZR8D0ara6HGoH1aB@debian> (raw)
In-Reply-To: <CAB+1q0Q3+7s1Lt8uW6DWZ7vfjhEKhG7O7MAQhCuH-C10cr9F4g@mail.gmail.com>

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.

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

  reply	other threads:[~2023-10-05 18:43 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 [this message]
2023-10-08  0:09   ` Gao Xiang

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=ZR8D0ara6HGoH1aB@debian \
    --to=xiang@kernel.org \
    --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