[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87tu86ulzt.fsf@nvidia.com>
Date: Mon, 27 Jun 2022 18:06:54 +0200
From: Petr Machata <petrm@...dia.com>
To: Stephen Hemminger <stephen@...workplumber.org>
CC: Petr Machata <petrm@...dia.com>, <netdev@...r.kernel.org>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH iproute2] ip: Fix size_columns() invocation that passes
a 32-bit quantity
Stephen Hemminger <stephen@...workplumber.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.
Powered by blists - more mailing lists