From f34fb69233f5fba68e9f992cedcaf5179106ab47 Mon Sep 17 00:00:00 2001 From: hyunuktak Date: Tue, 14 Jun 2016 19:16:43 +0900 Subject: [PATCH] Fix some svace Change-Id: I501fafa24e7d7b39bd36ec684c9bf27d1d094130 Signed-off-by: hyunuktak --- packaging/net-config.spec | 2 +- src/wifi-config.c | 2 +- src/wifi-eap-config.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/net-config.spec b/packaging/net-config.spec index 3367a2a..2b7b7e2 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -1,6 +1,6 @@ Name: net-config Summary: TIZEN Network Configuration service -Version: 1.1.74 +Version: 1.1.75 Release: 2 Group: System/Network License: Apache-2.0 diff --git a/src/wifi-config.c b/src/wifi-config.c index 1824ef2..216d5b3 100755 --- a/src/wifi-config.c +++ b/src/wifi-config.c @@ -139,7 +139,7 @@ static gboolean __get_mac_address(gchar **mac_address) #endif tmp = g_ascii_strdown(tmp_mac, (gssize)strlen(tmp_mac)); g_free(tmp_mac); - while (tmp[i]) { + while (tmp && tmp[i]) { if (tmp[i] != ':') mac[j++] = tmp[i]; i++; diff --git a/src/wifi-eap-config.c b/src/wifi-eap-config.c index 42a6329..49283ba 100755 --- a/src/wifi-eap-config.c +++ b/src/wifi-eap-config.c @@ -94,7 +94,7 @@ static int __config_save(const char *ssid, GKeyFile *keyfile) /* Do POSIX file operation to create and remove config files, * Do not use g_file_set_contents, it breaks inotify operations */ - if (fputs(data, file) < 0) { + if (data && fputs(data, file) < 0) { ERR("Failed to write %s", config_file); err = -EIO; -- 2.34.1