mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Use unsigned types for CPU counts and associated variables
This commit is contained in:

committed by
Benny Baumann

parent
53bcc5cbff
commit
a11d01568c
4
Meter.c
4
Meter.c
@ -32,7 +32,7 @@ const MeterClass Meter_class = {
|
||||
}
|
||||
};
|
||||
|
||||
Meter* Meter_new(const struct ProcessList_* pl, int param, const MeterClass* type) {
|
||||
Meter* Meter_new(const struct ProcessList_* pl, unsigned int param, const MeterClass* type) {
|
||||
Meter* this = xCalloc(1, sizeof(Meter));
|
||||
Object_setClass(this, type);
|
||||
this->h = 1;
|
||||
@ -140,7 +140,7 @@ ListItem* Meter_toListItem(const Meter* this, bool moving) {
|
||||
}
|
||||
char number[10];
|
||||
if (this->param > 0) {
|
||||
xSnprintf(number, sizeof(number), " %d", this->param);
|
||||
xSnprintf(number, sizeof(number), " %u", this->param);
|
||||
} else {
|
||||
number[0] = '\0';
|
||||
}
|
||||
|
Reference in New Issue
Block a user