@@ -97,7 +97,7 @@ static inline int print_rate(bool use_iec, enum output_type t,
return print_color_rate(use_iec, t, COLOR_NONE, key, fmt, rate);
}
-unsigned int print_range(const char *name, __u32 start, __u32 id);
+unsigned int print_range(const char *name, __u32 start, __u32 end);
int print_color_bool_opt(enum output_type type, enum color_attr color,
const char *key, bool value, bool show);
@@ -375,16 +375,16 @@ int print_color_rate(bool use_iec, enum output_type type, enum color_attr color,
return rc;
}
-unsigned int print_range(const char *name, __u32 start, __u32 id)
+unsigned int print_range(const char *name, __u32 start, __u32 end)
{
int width;
width = print_uint(PRINT_ANY, name, "%u", start);
- if (start != id) {
- char end[64];
+ if (start != end) {
+ char buf[64];
- snprintf(end, sizeof(end), "%sEnd", name);
- width += print_uint(PRINT_ANY, end, "-%u", id);
+ snprintf(buf, sizeof(buf), "%sEnd", name);
+ width += print_uint(PRINT_ANY, buf, "-%u", end);
}
return width;