Introduce ARRAYSIZE

This commit is contained in:
Christian Göttsche
2020-09-28 21:14:50 +02:00
parent b82a13c6ba
commit 42946ec113
4 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,7 @@ in the source distribution for its full text.
void Settings_delete(Settings* this) {
free(this->filename);
free(this->fields);
for (unsigned int i = 0; i < (sizeof(this->columns)/sizeof(MeterColumnSettings)); i++) {
for (unsigned int i = 0; i < ARRAYSIZE(this->columns); i++) {
String_freeArray(this->columns[i].names);
free(this->columns[i].modes);
}