aboutsummaryrefslogtreecommitdiff
path: root/plugins/huawei/mm-modem-helpers-huawei.c
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2018-10-17 23:06:48 -0700
committerAleksander Morgado <aleksander@aleksander.es>2018-10-18 13:17:36 +0200
commit7de6b6f2e176ed60f1f74d0d8704f73e39585891 (patch)
treee7a8e4adb2c7b6cd9da12be4c281440f6a796bc6 /plugins/huawei/mm-modem-helpers-huawei.c
parent749b806c30b41512dec4901808976425cdf3e56b (diff)
core: remove unnecessary NULL checks for g_match_info_free()
g_match_info_free() already check if the given pointer is NULL and does nothing on a NULL pointer.
Diffstat (limited to 'plugins/huawei/mm-modem-helpers-huawei.c')
-rw-r--r--plugins/huawei/mm-modem-helpers-huawei.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/plugins/huawei/mm-modem-helpers-huawei.c b/plugins/huawei/mm-modem-helpers-huawei.c
index 2aac3d60..70de4f54 100644
--- a/plugins/huawei/mm-modem-helpers-huawei.c
+++ b/plugins/huawei/mm-modem-helpers-huawei.c
@@ -257,8 +257,7 @@ mm_huawei_parse_dhcp_response (const char *reply,
}
}
- if (match_info)
- g_match_info_free (match_info);
+ g_match_info_free (match_info);
g_regex_unref (r);
return matched;
}
@@ -324,8 +323,7 @@ mm_huawei_parse_sysinfo_response (const char *reply,
}
}
- if (match_info)
- g_match_info_free (match_info);
+ g_match_info_free (match_info);
g_regex_unref (r);
return matched;
}
@@ -389,8 +387,7 @@ mm_huawei_parse_sysinfoex_response (const char *reply,
mm_get_uint_from_match_info (match_info, 8, out_sys_submode);
}
- if (match_info)
- g_match_info_free (match_info);
+ g_match_info_free (match_info);
g_regex_unref (r);
return matched;
}
@@ -1257,8 +1254,7 @@ gboolean mm_huawei_parse_nwtime_response (const gchar *response,
}
}
- if (match_info)
- g_match_info_free (match_info);
+ g_match_info_free (match_info);
g_regex_unref (r);
return ret;
@@ -1329,8 +1325,7 @@ gboolean mm_huawei_parse_time_response (const gchar *response,
}
}
- if (match_info)
- g_match_info_free (match_info);
+ g_match_info_free (match_info);
g_regex_unref (r);
return ret;
@@ -1400,8 +1395,7 @@ mm_huawei_parse_hcsq_response (const gchar *response,
ret = TRUE;
done:
- if (match_info)
- g_match_info_free (match_info);
+ g_match_info_free (match_info);
g_regex_unref (r);
return ret;
@@ -1463,8 +1457,7 @@ mm_huawei_parse_cvoice_response (const gchar *response,
}
}
- if (match_info)
- g_match_info_free (match_info);
+ g_match_info_free (match_info);
g_regex_unref (r);
return ret;