[gnome-software/wip/hughsie/fwupd] trivial: fd is always valid



commit 065abfec45311f5efb79d056f412856522f38585
Author: Richard Hughes <richard hughsie com>
Date:   Wed Apr 8 21:48:15 2015 +0100

    trivial: fd is always valid

 src/plugins/gs-plugin-fwupd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-plugin-fwupd.c b/src/plugins/gs-plugin-fwupd.c
index 68e9821..d3f0754 100644
--- a/src/plugins/gs-plugin-fwupd.c
+++ b/src/plugins/gs-plugin-fwupd.c
@@ -648,7 +648,7 @@ gs_plugin_fwupd_upgrade (GsPlugin *plugin,
        close (fd);
 
        /* send message */
-       body = g_variant_new ("(sha{sv})", device_id, fd > -1 ? 0 : -1, &builder);
+       body = g_variant_new ("(sha{sv})", device_id, 0, &builder);
        g_dbus_message_set_body (request, body);
        message = g_dbus_connection_send_message_with_reply_sync (conn,
                                                                  request,
@@ -834,7 +834,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
        close (fd);
 
        /* send message */
-       body = g_variant_new ("(h)", fd > -1 ? 0 : -1);
+       body = g_variant_new ("(h)", 0);
        g_dbus_message_set_body (request, body);
        message = g_dbus_connection_send_message_with_reply_sync (conn,
                                                                  request,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]