[gupnp] Variable might be used uninitialized.



commit c990c0444194cf9012eb3ad9f774cab0f0203b3b
Author: Ludovic Ferrandis <ludovic ferrandis intel com>
Date:   Mon Aug 5 14:30:39 2013 +0200

    Variable might be used uninitialized.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704094

 libgupnp/gupnp-device-info.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libgupnp/gupnp-device-info.c b/libgupnp/gupnp-device-info.c
index 1afb025..9ef38fd 100644
--- a/libgupnp/gupnp-device-info.c
+++ b/libgupnp/gupnp-device-info.c
@@ -751,10 +751,12 @@ gupnp_device_info_get_icon_url (GUPnPDeviceInfo *info,
                         icon = icon_parse (info, element);
 
                         if (requested_mime_type) {
-                               if (icon->mime_type)
-                                       mime_type_ok = !strcmp (
-                                               requested_mime_type,
-                                               (char *) icon->mime_type);
+                                if (icon->mime_type)
+                                        mime_type_ok = !strcmp (
+                                                requested_mime_type,
+                                                (char *) icon->mime_type);
+                                else
+                                        mime_type_ok = FALSE;
                         } else
                                 mime_type_ok = TRUE;
 


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