Commit 04b8a7a7 authored by Ralf Habacker's avatar Ralf Habacker

Fix warning: variable 'ret' set but not used [-Wunused-but-set-variable].

Only set valid child status in case exit code has been gotten from
child process, otherwise signal failure through thread return value.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent 34d0c73f
...@@ -616,13 +616,16 @@ babysitter (void *parameter) ...@@ -616,13 +616,16 @@ babysitter (void *parameter)
DWORD status; DWORD status;
PING(); PING();
// wait until process finished
WaitForSingleObject (sitter->child_handle, INFINITE); WaitForSingleObject (sitter->child_handle, INFINITE);
PING(); PING();
ret = GetExitCodeProcess (sitter->child_handle, &status); ret = GetExitCodeProcess (sitter->child_handle, &status);
if (ret)
sitter->child_status = status; {
sitter->have_child_status = TRUE; sitter->child_status = status;
sitter->have_child_status = TRUE;
}
CloseHandle (sitter->child_handle); CloseHandle (sitter->child_handle);
sitter->child_handle = NULL; sitter->child_handle = NULL;
...@@ -637,7 +640,7 @@ babysitter (void *parameter) ...@@ -637,7 +640,7 @@ babysitter (void *parameter)
_dbus_babysitter_unref (sitter); _dbus_babysitter_unref (sitter);
return 0; return ret ? 0 : 1;
} }
dbus_bool_t dbus_bool_t
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment