]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus-spawn-win.c: Simplify logic of return value from call to _dbus_spawn_program()
authorRalf Habacker <ralf.habacker@freenet.de>
Fri, 21 Dec 2018 16:55:29 +0000 (17:55 +0100)
committerRalf <ralf@linux1.fritz.box>
Sat, 5 Jan 2019 10:41:58 +0000 (11:41 +0100)
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
dbus/dbus-spawn-win.c

index 87255964dc25fddb2b14b3ae96909e386b485066..ca79605592fca910739676f0e7409ee7ee9e31d2 100644 (file)
@@ -674,11 +674,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter           **sitter_p,
     }
 
   PING();
-  if (handle != INVALID_HANDLE_VALUE)
-    {
-      sitter->child_handle = handle;
-    }
-  else
+  if (handle == INVALID_HANDLE_VALUE)
     {
       sitter->child_handle = NULL;
       sitter->have_spawn_errno = TRUE;
@@ -688,6 +684,8 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter           **sitter_p,
       goto out0;
     }
 
+  sitter->child_handle = handle;
+
   PING();
   sitter->thread_handle = (HANDLE) CreateThread (NULL, 0, babysitter,
                   _dbus_babysitter_ref (sitter), 0, &sitter_thread_id);