Use the saved returned value of sym_get_string_value() instead of calling it twice.
Unified · Split
| @@ -137,7 +137,7 @@ static int conf_string(struct menu *menu) · 136 unmodified lines | ||
| 137 | 137 | printf("%*s%s ", indent - 1, "", menu->prompt->text); |
| 138 | 138 | printf("(%s) ", sym->name); |
| 139 | 139 | def = sym_get_string_value(sym); |
| 140 | − if (sym_get_string_value(sym)) | |
| 140 | + if (def) | |
| 141 | 141 | printf("[%s] ", def); |
| 142 | 142 | if (!conf_askvalue(sym, def)) |
| 143 | 143 | return 0; |