Avoid explicit number of error strings in cmkr_error_status()

This commit is contained in:
Peter Meerwald-Stadler
2021-12-10 17:07:11 +01:00
parent 19101cd726
commit 31cc1c9481
+2 -2
View File
@@ -20,6 +20,6 @@ static const char *err_string[] = {
};
const char *cmkr_error_status(int i) {
assert(i >= 0 && i < 5);
assert(i >= 0 && i < (sizeof(err_string) / sizeof(*(err_string))));
return err_string[i];
}
}