public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Serhey Popovych <serhe.popovych@gmail.com>
Cc: netdev@vger.kernel.org, dedeckeh@gmail.com
Subject: Re: [PATCH iproute2] fix print_0xhex on 32 bit
Date: Wed, 19 Dec 2018 14:02:18 -0800	[thread overview]
Message-ID: <20181219140218.60d0cab7@xeon-e3> (raw)
In-Reply-To: <5f7269b6-f53d-b9d3-96f7-b2f86ccf759e@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

On Wed, 19 Dec 2018 22:00:38 +0200
Serhey Popovych <serhe.popovych@gmail.com> wrote:

> Stephen Hemminger wrote:
> 
> > The argument to print_0xhex is converted to unsigned long long
> > so the format string give for normal printout has to be some
> > variant of %llx. Otherwise, bogus values will be printed on
> > 32 bit platforms.  
> 
> Sorry it is too late and change is merged as commit 90c5c969f0b9
> ("fix print_0xhex on 32 bit") but I want to ask following:
> 
>   $ printf '0x%llx != %#llx\n' 0 0
>   0x0 != 0
> 
> So we potentially can get "tos 0" vs "tos 0x0" previously. Is that
> expected and will not cause any compatibility problems?
> 
> It is clear that 0 is always zero, but some code may rely on 0x form
> even for zero. What do you think?
> 
> Thanks.
> 
> 

Hmm. that is a surprise. we can change back if it matters.
Was just trying to be consistent.  Since most code that scraps is going to use strtoul(str, NULL, 16)
it shouldn't matter.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2018-12-19 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10 22:27 [PATCH iproute2] fix print_0xhex on 32 bit Stephen Hemminger
2018-12-11  9:05 ` Hans Dedecker
2018-12-19 20:00 ` Serhey Popovych
2018-12-19 22:02   ` Stephen Hemminger [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=20181219140218.60d0cab7@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dedeckeh@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=serhe.popovych@gmail.com \
    /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