mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Use size_t as len type for Meter_UpdateValues
Most of the time the parameter is passed to snprintf type functions
This commit is contained in:

committed by
Benny Baumann

parent
d9224c66a4
commit
e1ce141bc3
5
Meter.c
5
Meter.c
@ -49,7 +49,7 @@ Meter* Meter_new(const struct ProcessList_* pl, int param, const MeterClass* typ
|
||||
return this;
|
||||
}
|
||||
|
||||
int Meter_humanUnit(char* buffer, unsigned long int value, int size) {
|
||||
int Meter_humanUnit(char* buffer, unsigned long int value, size_t size) {
|
||||
const char* prefix = "KMGTPEZY";
|
||||
unsigned long int powi = 1;
|
||||
unsigned int powj = 1, precision = 2;
|
||||
@ -441,8 +441,7 @@ const MeterMode* const Meter_modes[] = {
|
||||
|
||||
/* Blank meter */
|
||||
|
||||
static void BlankMeter_updateValues(Meter* this, char* buffer, int size) {
|
||||
(void) this; (void) buffer; (void) size;
|
||||
static void BlankMeter_updateValues(ATTR_UNUSED Meter* this, char* buffer, size_t size) {
|
||||
if (size > 0) {
|
||||
*buffer = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user