public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Jakub Wilk <jwilk@jwilk.net>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: [PATCH] bswap.3: Use strtoull() for parsing 64-bit numbers
Date: Fri, 11 Sep 2020 14:11:42 +0200	[thread overview]
Message-ID: <9fda07d3-74bc-24b4-c2de-ab522d7e5bb6@gmail.com> (raw)
In-Reply-To: <20200911114446.3971-1-jwilk@jwilk.net>

Hello Jakub,

On 9/11/20 1:44 PM, Jakub Wilk wrote:
> Before, on 32-bit systems:
> 
>     $ ./a.out 0x0123456789abcdef
>     0xffffffff ==> 0xffffffff00000000
> 
> After:
> 
>     $ ./a.out 0x0123456789abcdef
>     0x123456789abcdef ==> 0xefcdab8967452301
> 
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>

Sigh!

Thanks. Patch applied.

Cheers,

Michael

> ---
>  man3/bswap.3 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man3/bswap.3 b/man3/bswap.3
> index 412e1702f..ce847580a 100644
> --- a/man3/bswap.3
> +++ b/man3/bswap.3
> @@ -72,7 +72,7 @@ main(int argc, char *argv[])
>          exit(EXIT_FAILURE);
>      }
>  
> -    x = strtoul(argv[1], NULL, 0);
> +    x = strtoull(argv[1], NULL, 0);
>      printf("0x%" PRIx64 " ==> 0x%" PRIx64 "\en", x, bswap_64(x));
>  
>      exit(EXIT_SUCCESS);
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2020-09-11 12:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 11:44 [PATCH] bswap.3: Use strtoull() for parsing 64-bit numbers Jakub Wilk
2020-09-11 12:11 ` Michael Kerrisk (man-pages) [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=9fda07d3-74bc-24b4-c2de-ab522d7e5bb6@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=jwilk@jwilk.net \
    --cc=linux-man@vger.kernel.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