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:
Christian Göttsche
2020-11-24 18:31:03 +01:00
committed by Benny Baumann
parent d9224c66a4
commit e1ce141bc3
21 changed files with 33 additions and 30 deletions

View File

@ -24,7 +24,7 @@ static const int LoadMeter_attributes[] = {
LOAD
};
static void LoadAverageMeter_updateValues(Meter* this, char* buffer, int size) {
static void LoadAverageMeter_updateValues(Meter* this, char* buffer, size_t size) {
Platform_getLoadAverage(&this->values[0], &this->values[1], &this->values[2]);
xSnprintf(buffer, size, "%.2f/%.2f/%.2f", this->values[0], this->values[1], this->values[2]);
}
@ -40,7 +40,7 @@ static void LoadAverageMeter_display(const Object* cast, RichString* out) {
RichString_append(out, CRT_colors[LOAD_AVERAGE_FIFTEEN], buffer);
}
static void LoadMeter_updateValues(Meter* this, char* buffer, int size) {
static void LoadMeter_updateValues(Meter* this, char* buffer, size_t size) {
double five, fifteen;
Platform_getLoadAverage(&this->values[0], &five, &fifteen);
if (this->values[0] > this->total) {