]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsirq,irqtop: cleanup threshold datatype
authorKarel Zak <kzak@redhat.com>
Mon, 18 Nov 2024 10:27:26 +0000 (11:27 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 18 Nov 2024 10:27:26 +0000 (11:27 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/irq-common.c
sys-utils/irq-common.h

index 6ed124f1017fbe400854cb8cfe6f976665f4041b..f069d8a631ffe9add8435df847525148803f5fb1 100644 (file)
@@ -531,7 +531,7 @@ struct libscols_table *get_scols_table(struct irq_output *out,
                                              struct irq_stat *prev,
                                              struct irq_stat **xstat,
                                              int softirq,
-                                             unsigned long threshold,
+                                             uintmax_t threshold,
                                              size_t setsize,
                                              cpu_set_t *cpuset)
 {
@@ -570,7 +570,7 @@ struct libscols_table *get_scols_table(struct irq_output *out,
        }
 
        for (i = 0; i < stat->nr_irq; i++)
-               if (result[i].total >= threshold)
+               if ((uintmax_t) result[i].total >= threshold)
                        add_scols_line(out, &result[i], table);
 
        free(result);
index cb68c58e524dd55f4e87513ce6a1a00c4190d6cf..a23a51a96061d482754c3070d6f890342b090c29 100644 (file)
@@ -76,7 +76,7 @@ struct libscols_table *get_scols_table(struct irq_output *out,
                                               struct irq_stat *prev,
                                               struct irq_stat **xstat,
                                               int softirq,
-                                              unsigned long threshold,
+                                              uintmax_t threshold,
                                               size_t setsize,
                                               cpu_set_t *cpuset);