Esme Povirk (@madewokherd) commented about dlls/sane.ds/ui.c:
option->type = opt->type;
option->value.int_val = pos;
free(sf);
}
- }
+}
+static BOOL save_cfg_data(HWND hwnd, WCHAR file_path[128], int type, int optno) +{
- ScannerOption *options = malloc((cntOptionsExist + 1) * sizeof(ScannerOption));
- if (!options) {
ERR("Failed to allocate memory for options array\n");
return FALSE;
- }
- switch(type)
This reads to me like 2 entirely different functions with different interfaces that have been combined into 1 with a switch.