aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-03-21 20:57:02 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-03-22 12:19:49 +0100
commitde88d8572a3456ddf1bb47908f89d27dc1e419d5 (patch)
treed82e85541f1b880146cd69d7fce1fd8e21c301ac /src
parent35f48c67eab96ad1a4943b3c9dcb361d9caf7c34 (diff)
downloadexternal_libqmi-de88d8572a3456ddf1bb47908f89d27dc1e419d5.zip
external_libqmi-de88d8572a3456ddf1bb47908f89d27dc1e419d5.tar.gz
external_libqmi-de88d8572a3456ddf1bb47908f89d27dc1e419d5.tar.bz2
qmicli,wds: only need to initialize enum member fields in struct
When doing member initializations when the struct variable is declared, only initialize the enum fields to valid enum values, the remaining fields will be initialized to zero. This is a different approach to the fix done in 4c678418.
Diffstat (limited to 'src')
-rw-r--r--src/qmicli/qmicli-wds.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/qmicli/qmicli-wds.c b/src/qmicli/qmicli-wds.c
index 75d7992..fcc5b49 100644
--- a/src/qmicli/qmicli-wds.c
+++ b/src/qmicli/qmicli-wds.c
@@ -439,7 +439,7 @@ start_network_properties_handle (const gchar *key,
return TRUE;
}
- if (g_ascii_strcasecmp (key, "ip-type") == 0 && props->ip_type == 0) {
+ if (g_ascii_strcasecmp (key, "ip-type") == 0 && props->ip_type == QMI_WDS_IP_FAMILY_UNSPECIFIED) {
switch (atoi (value)) {
case 4:
props->ip_type = QMI_WDS_IP_FAMILY_IPV4;
@@ -474,13 +474,8 @@ start_network_input_create (const gchar *str)
gchar **split = NULL;
QmiMessageWdsStartNetworkInput *input = NULL;
StartNetworkProperties props = {
- .apn = NULL,
- .profile_index_3gpp = 0,
- .profile_index_3gpp2 = 0,
- .auth = QMI_WDS_AUTHENTICATION_NONE,
- .auth_set = FALSE,
- .username = NULL,
- .password = NULL,
+ .auth = QMI_WDS_AUTHENTICATION_NONE,
+ .ip_type = QMI_WDS_IP_FAMILY_UNSPECIFIED,
};
/* An empty string is totally valid (i.e. no TLVs) */