update_desktop_file_entry: initialize return value properly, and actually return it
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 21 Jul 2011 12:21:29 +0000 (13:21 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 21 Sep 2011 10:34:31 +0000 (11:34 +0100)
Since 1.4.4 (commit 75cfd97f) this function always returned FALSE. As far
as I can see this was actually harmless, because both of its callers
ignore any error that is not NoMemory (and treat it the same as success).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39230
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
bus/activation.c

index 8c9f559..acb2aa8 100644 (file)
@@ -268,6 +268,7 @@ update_desktop_file_entry (BusActivation       *activation,
 
   _DBUS_ASSERT_ERROR_IS_CLEAR (error);
 
+  retval = FALSE;
   name = NULL;
   exec = NULL;
   user = NULL;
@@ -478,7 +479,7 @@ out:
   if (entry)
     bus_activation_entry_unref (entry);
 
-  return FALSE;
+  return retval;
 }
 
 static dbus_bool_t