Hugh McMaster hugh.mcmaster@outlook.com writes:
@@ -1593,11 +1593,11 @@ void delete_registry_key(WCHAR *reg_key_name)
if (!(key_class = parse_key_name(reg_key_name, &key_name))) { output_message(STRING_INCORRECT_REG_CLASS, reg_key_name);
exit(1);
} if (!*key_name) { output_message(STRING_DELETE_REG_CLASS_FAILED, reg_key_name);return;
exit(1);
return;
If the process is going to exit anyway, freeing memory is a waste of time.
On Tuesday, 11 July 2017 4:36 AM, Alexandre Julliard wrote:
Hugh McMaster hugh.mcmaster@outlook.com writes:
@@ -1593,11 +1593,11 @@ void delete_registry_key(WCHAR *reg_key_name) if (!(key_class = parse_key_name(reg_key_name, &key_name))) { output_message(STRING_INCORRECT_REG_CLASS, reg_key_name); - exit(1); + return; } if (!*key_name) { output_message(STRING_DELETE_REG_CLASS_FAILED, reg_key_name); - exit(1); + return;
If the process is going to exit anyway, freeing memory is a waste of time.
At the very least, all uses of exit(1) should be exit(0), as the Windows version always terminates with an exit code of zero. But I don't how much this matters in practice.
Do you want me to change them? I think there are around seven or eight exit() calls in the code.
Hugh McMaster hugh.mcmaster@outlook.com writes:
On Tuesday, 11 July 2017 4:36 AM, Alexandre Julliard wrote:
Hugh McMaster hugh.mcmaster@outlook.com writes:
@@ -1593,11 +1593,11 @@ void delete_registry_key(WCHAR *reg_key_name) if (!(key_class = parse_key_name(reg_key_name, &key_name))) { output_message(STRING_INCORRECT_REG_CLASS, reg_key_name); - exit(1); + return; } if (!*key_name) { output_message(STRING_DELETE_REG_CLASS_FAILED, reg_key_name); - exit(1); + return;
If the process is going to exit anyway, freeing memory is a waste of time.
At the very least, all uses of exit(1) should be exit(0), as the Windows version always terminates with an exit code of zero. But I don't how much this matters in practice.
Do you want me to change them? I think there are around seven or eight exit() calls in the code.
I'd suggest some kind of fatal_error() helper that prints an error and exits.
On Tuesday, 11 July 2017 5:00 PM, Alexandre Julliard wrote:
I'd suggest some kind of fatal_error() helper that prints an error and exits.
Sure. It would be good for that function to accept a resource string ID for customization. Then we can exit(0) from there.