[gnome-desktop] gnome-pnp-ids: Remove unused filename variable



commit 29a4d20f793cb30806e2d6209adf3696775dad48
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Sep 20 11:15:27 2011 +0100

    gnome-pnp-ids: Remove unused filename variable

 libgnome-desktop/gnome-pnp-ids.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/libgnome-desktop/gnome-pnp-ids.c b/libgnome-desktop/gnome-pnp-ids.c
index 47e3a06..7352f0d 100644
--- a/libgnome-desktop/gnome-pnp-ids.c
+++ b/libgnome-desktop/gnome-pnp-ids.c
@@ -196,17 +196,14 @@ static const struct Vendor vendors[] =
 static gboolean
 gnome_pnp_ids_load (GnomePnpIds *pnp_ids, GError **error)
 {
-        gboolean ret;
-        gchar *filename = NULL;
         gchar *retval = NULL;
         GnomePnpIdsPrivate *priv = pnp_ids->priv;
         guint i;
 
         /* load the contents */
         g_debug ("loading: %s", PNP_IDS);
-        ret = g_file_get_contents (PNP_IDS, &priv->table_data, NULL, error);
-        if (!ret)
-                goto out;
+        if (g_file_get_contents (PNP_IDS, &priv->table_data, NULL, error) == FALSE)
+                return FALSE;
 
         /* parse into lines */
         retval = priv->table_data;
@@ -228,9 +225,8 @@ gnome_pnp_ids_load (GnomePnpIds *pnp_ids, GError **error)
                         retval = &priv->table_data[i+1];
                 }
         }
-out:
-        g_free (filename);
-        return ret;
+
+        return TRUE;
 }
 
 static const char *



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