Remove unwanted NULL check for service in append_properties() 03/214903/2
authorNishant Chaprana <n.chaprana@samsung.com>
Fri, 27 Sep 2019 09:51:16 +0000 (15:21 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Mon, 7 Oct 2019 06:26:47 +0000 (11:56 +0530)
Description: The service will be always allocated when append_properties()
is called, so this NULL check is not required.
This NULL check generates SVACE warning which is actually a FALSE alarm.

Change-Id: I9b3a15529f6614cb375b8fb7ec656a3c44eeb180
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/connman.spec
src/service.c

index a2774df..f4fa2a9 100644 (file)
@@ -5,7 +5,7 @@
 
 Name:           connman
 Version:        1.37
-Release:        34
+Release:        35
 License:        GPL-2.0+
 Summary:        Connection Manager
 Url:            http://connman.net
index 9cbfa6c..b06471d 100644 (file)
@@ -3435,18 +3435,16 @@ static void append_properties(DBusMessageIter *dict, dbus_bool_t limited,
 
 #if defined TIZEN_EXT
        unsigned int frequency = 0U;
-       if (service && service->network) {
-               frequency = connman_network_get_frequency(service->network);
-               connman_dbus_dict_append_basic(dict, "Frequency",
-                               DBUS_TYPE_UINT16, &frequency);
-       }
-
        unsigned char *wifi_vsie;
        unsigned int wifi_vsie_len;
        GSList *vsie_list = NULL;
 
-       if (service->network)
+       if (service->network) {
+               frequency = connman_network_get_frequency(service->network);
+               connman_dbus_dict_append_basic(dict, "Frequency",
+                               DBUS_TYPE_UINT16, &frequency);
                vsie_list = (GSList *)connman_network_get_vsie_list(service->network);
+       }
 
        if (vsie_list) {
                GSList *list;