Fix the use of uninitialized values 22/307122/1 accepted/tizen/unified/20240307.171927 accepted/tizen/unified/x/20240311.100407
authorJaehyun Kim <jeik01.kim@samsung.com>
Tue, 5 Mar 2024 06:21:54 +0000 (15:21 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Tue, 5 Mar 2024 06:21:54 +0000 (15:21 +0900)
Change-Id: I8fa0a53426959b76fa1bb3c9f14af731b0834067
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
client/ins.c

index 6403f610c7966346b19ed0f09ef867c8c1da42d8..929c6a939f08b2f5a47e91bab3a349f56f240e92 100755 (executable)
@@ -95,7 +95,7 @@ static GSList *get_bssid_list(DBusMessageIter *iter, struct ins_info_s *ins_info
                if (strcmp(property, "BSSID") == 0) {
                        bssid_info = g_try_new0(struct bssid_info_s, 1);
                        if (!bssid_info)
-                               continue;
+                               break;
 
                        dbus_message_iter_next(&entry);
                        dbus_message_iter_recurse(&entry, &val);
@@ -157,19 +157,19 @@ static void print_ins_info(int *rank, struct ins_info_s *ins_info,
                char *path, char *filter, DBusMessageIter *iter)
 {
        char *name = "";
-       char *security;
+       char *security = "";
        char *str = NULL;
        int count = 0;
        char *property;
-       unsigned char strength;
-       unsigned int frequency;
-       int score_INS;
-       int score_last_user_selection;
-       int score_last_connected;
-       int score_frequency;
-       int score_security_priority;
-       int score_internet_connection;
-       int score_strength;
+       unsigned char strength = 0;
+       unsigned int frequency = 0;
+       int score_INS = 0;
+       int score_last_user_selection = 0;
+       int score_last_connected = 0;
+       int score_frequency = 0;
+       int score_security_priority = 0;
+       int score_internet_connection = 0;
+       int score_strength = 0;
        GSList *bssid_list = NULL;
        DBusMessageIter entry, val, dict;