Skip to content

Commit fc54b88

Browse files
committed
Simplify Settings toFieldName logic relating to dynamic columns
1 parent 80ac0c6 commit fc54b88

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Settings.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,9 @@ static const char* toFieldName(Hashtable* columns, int id, bool* enabled) {
185185
}
186186
if (id >= ROW_DYNAMIC_FIELDS) {
187187
const DynamicColumn* column = DynamicColumn_lookup(columns, id);
188-
if (!column) {
189-
if (enabled)
190-
*enabled = false;
191-
return NULL;
192-
}
193188
if (enabled)
194-
*enabled = column->enabled;
195-
return column->name;
189+
*enabled = column ? column->enabled : false;
190+
return column ? column->name : NULL;
196191
}
197192
if (enabled)
198193
*enabled = true;

0 commit comments

Comments
 (0)