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

[virt-tools-list] [libosinfo] Remove a redundant private function



From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>

---
 osinfo/osinfo_media.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index e03bfe0..6e33634 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -219,17 +219,6 @@ osinfo_media_get_property (GObject    *object,
     }
 }
 
-static void set_param_from_boolean (OsinfoMedia *media,
-                                    const gchar *key,
-                                    gboolean value)
-{
-    if (value)
-        osinfo_entity_set_param (OSINFO_ENTITY(media), key, "true");
-    else
-        osinfo_entity_set_param (OSINFO_ENTITY(media), key, "false");
-}
-
-
 static void
 osinfo_media_set_property(GObject      *object,
                               guint         property_id,
@@ -288,15 +277,15 @@ osinfo_media_set_property(GObject      *object,
         break;
 
     case PROP_LIVE:
-        set_param_from_boolean (media,
-                                OSINFO_MEDIA_PROP_LIVE,
-                                g_value_get_boolean (value));
+        osinfo_entity_set_param_boolean (OSINFO_ENTITY(media),
+                                         OSINFO_MEDIA_PROP_LIVE,
+                                         g_value_get_boolean (value));
         break;
 
     case PROP_INSTALLER:
-        set_param_from_boolean (media,
-                                OSINFO_MEDIA_PROP_INSTALLER,
-                                g_value_get_boolean (value));
+        osinfo_entity_set_param_boolean (OSINFO_ENTITY(media),
+                                         OSINFO_MEDIA_PROP_INSTALLER,
+                                         g_value_get_boolean (value));
         break;
 
     default:
-- 
1.7.12


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