]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: fix type incompatibility in ifstat.c
authorStephen Gallagher <sgallagh@redhat.com>
Tue, 6 Feb 2024 16:52:34 +0000 (11:52 -0500)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 15 Feb 2024 03:06:36 +0000 (19:06 -0800)
Throughout ifstat.c, ifstat_ent.val is accessed as a long long unsigned
type, however it is defined as __u64. This works by coincidence on many
systems, however on ppc64le, __u64 is a long unsigned.

This patch makes the type definition consistent with all of the places
where it is accessed.

Fixes: 5a52102b7c8f ("ifstat: Add extended statistics to ifstat")
Reviewed-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
misc/ifstat.c

index 721f491490345d63e4b7b21153867c19e7084c71..767cedd4aa475a33a29bdc5485e9253ace36df28 100644 (file)
@@ -58,7 +58,7 @@ struct ifstat_ent {
        struct ifstat_ent       *next;
        char                    *name;
        int                     ifindex;
-       __u64                   val[MAXS];
+       unsigned long long      val[MAXS];
        double                  rate[MAXS];
        __u32                   ival[MAXS];
 };