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)
DWORD status;
PING();
// wait until process finished
WaitForSingleObject (sitter->child_handle, INFINITE);
PING();
ret = GetExitCodeProcess (sitter->child_handle, &status);
sitter->child_status = status;
sitter->have_child_status = TRUE;
if (ret)
{
sitter->child_status = status;
sitter->have_child_status = TRUE;
}
CloseHandle (sitter->child_handle);
sitter->child_handle = NULL;
......@@ -637,7 +640,7 @@ babysitter (void *parameter)
_dbus_babysitter_unref (sitter);
return 0;
return ret ? 0 : 1;
}
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