netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Petr Machata <petrm@nvidia.com>, <netdev@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH iproute2] ip: Fix size_columns() invocation that passes a 32-bit quantity
Date: Mon, 27 Jun 2022 18:06:54 +0200	[thread overview]
Message-ID: <87tu86ulzt.fsf@nvidia.com> (raw)
In-Reply-To: <20220627081421.3228af32@hermes.local>


Stephen Hemminger <stephen@networkplumber.org> writes:

>> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
>> index 5a3b1cae..8cd76073 100644
>> --- a/ip/ipaddress.c
>> +++ b/ip/ipaddress.c
>> @@ -788,8 +788,9 @@ void print_stats64(FILE *fp, struct rtnl_link_stats64 *s,
>>  				     s->tx_aborted_errors, s->tx_fifo_errors,
>>  				     s->tx_window_errors,
>>  				     s->tx_heartbeat_errors,
>> -				     carrier_changes ?
>> -				     rta_getattr_u32(carrier_changes) : 0);
>> +				     (uint64_t)(carrier_changes ?
>> +						rta_getattr_u32(carrier_changes)
>> +						: 0));
>
> Looks good, but would be clearer with a local temporary variable
> which would eliminate the cast etc.

OK, I have a v2 queued up. I'll wait a bit before sending for possible
comments on the rx_otherhost_dropped patch, as it depends on this one,
and will need to be resent for this change anyway.

      reply	other threads:[~2022-06-27 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 13:20 [PATCH iproute2] ip: Fix size_columns() invocation that passes a 32-bit quantity Petr Machata
2022-06-27 15:14 ` Stephen Hemminger
2022-06-27 16:06   ` Petr Machata [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=87tu86ulzt.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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;
as well as URLs for NNTP newsgroup(s).