From 42946ec113e8ae6d6bc114dbd90e9721f464abfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Mon, 28 Sep 2020 21:14:50 +0200 Subject: Introduce ARRAYSIZE --- Settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Settings.c') diff --git a/Settings.c b/Settings.c index 0aac4796..1cfd0061 100644 --- a/Settings.c +++ b/Settings.c @@ -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); } -- cgit v1.2.3