[network-manager-openvpn] build: avoid compiler warnings about uninitialized variable
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] build: avoid compiler warnings about uninitialized variable
- Date: Mon, 23 Mar 2015 11:47:07 +0000 (UTC)
commit ff983b83ce5f24507157c492254f96a2e957a78b
Author: Thomas Haller <thaller redhat com>
Date: Mon Mar 23 12:45:04 2015 +0100
build: avoid compiler warnings about uninitialized variable
Also, use strcmp() instead of g_strcmp0() where the argument
is obviously not NULL.
src/nm-openvpn-service.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 9b75c37..4912082 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -1032,6 +1032,7 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
dev_type_is_tap = g_str_has_prefix (tmp, "tap");
} else if (tmp2) {
add_openvpn_arg (args, tmp2);
+ dev_type_is_tap = FALSE; /* will be reset below (avoid maybe-uninitialized warning) */
} else if (tmp3 && !strcmp (tmp3, "yes")) {
add_openvpn_arg (args, "tap");
dev_type_is_tap = TRUE;
@@ -1044,7 +1045,7 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
if (tmp2) {
add_openvpn_arg (args, "--dev-type");
add_openvpn_arg (args, tmp2);
- dev_type_is_tap = (g_strcmp0 (tmp2, "tap") == 0);
+ dev_type_is_tap = (strcmp (tmp2, "tap") == 0);
}
/* Cipher */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]