Merge branch 'lsb' of eworm-de/htop (skip "n/a" values for SysArchMeter)

This commit is contained in:
Daniel Lange 2021-02-04 17:27:16 +01:00
commit fd1ad863dc
1 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,11 @@ static void SysArchMeter_updateValues(Meter* this, char* buffer, size_t size) {
char* value = String_trim(&line[n + 1]); char* value = String_trim(&line[n + 1]);
line[n] = '\0'; line[n] = '\0';
if(String_eq(value, "n/a")) {
free(value);
continue;
}
if(String_eq(line, "Distributor ID")) if(String_eq(line, "Distributor ID"))
snprintf(distro[0], sizeof(distro[0]), "%s", value); snprintf(distro[0], sizeof(distro[0]), "%s", value);
else if(String_eq(line, "Release")) else if(String_eq(line, "Release"))