From 68690d2c0d108720fcb886df1327004c9e776107 Mon Sep 17 00:00:00 2001 From: Jaehyun Kim Date: Tue, 5 Mar 2024 15:21:54 +0900 Subject: Fix the use of uninitialized values Change-Id: I8fa0a53426959b76fa1bb3c9f14af731b0834067 Signed-off-by: Jaehyun Kim --- client/ins.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'client') diff --git a/client/ins.c b/client/ins.c index 6403f610..929c6a93 100755 --- a/client/ins.c +++ b/client/ins.c @@ -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; -- cgit v1.2.3