Reduce variable scope

Also avoid declaring variables of different type, pointer and array, in
the same line.
This commit is contained in:
Christian Göttsche
2021-09-02 22:32:40 +02:00
committed by BenBE
parent b9fdf1c2a1
commit 7891cdc552
2 changed files with 4 additions and 2 deletions

View File

@ -134,8 +134,9 @@ static void Settings_readFields(Settings* settings, const char* line) {
}
// Dynamically-defined columns are always stored by-name.
char* end, dynamic[32] = {0};
char dynamic[32] = {0};
if (sscanf(ids[i], "Dynamic(%30s)", dynamic)) {
char* end;
if ((end = strrchr(dynamic, ')')) == NULL)
continue;
*end = '\0';