diff options
author | Ben Chan <benchan@chromium.org> | 2018-10-17 23:06:48 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-10-18 13:17:36 +0200 |
commit | 7de6b6f2e176ed60f1f74d0d8704f73e39585891 (patch) | |
tree | e7a8e4adb2c7b6cd9da12be4c281440f6a796bc6 /plugins/ublox/mm-modem-helpers-ublox.c | |
parent | 749b806c30b41512dec4901808976425cdf3e56b (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/ublox/mm-modem-helpers-ublox.c')
-rw-r--r-- | plugins/ublox/mm-modem-helpers-ublox.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c index ff1a8488..b6fd34d9 100644 --- a/plugins/ublox/mm-modem-helpers-ublox.c +++ b/plugins/ublox/mm-modem-helpers-ublox.c @@ -78,8 +78,7 @@ mm_ublox_parse_upincnt_response (const gchar *response, out: - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { @@ -144,8 +143,7 @@ mm_ublox_parse_uusbconf_response (const gchar *response, g_free (profile_name); } - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { @@ -205,8 +203,7 @@ mm_ublox_parse_ubmconf_response (const gchar *response, } } - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { @@ -292,8 +289,7 @@ mm_ublox_parse_uipaddr_response (const gchar *response, out: - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { @@ -982,8 +978,7 @@ mm_ublox_parse_uact_response (const gchar *response, g_free (bandstr); } - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { @@ -1097,8 +1092,7 @@ mm_ublox_parse_uact_test (const gchar *response, out: g_strfreev (split); - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { @@ -1229,8 +1223,7 @@ out: g_free (allowed_str); g_free (preferred_str); - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { @@ -1449,8 +1442,7 @@ mm_ublox_parse_ugcntrd_response_for_cid (const gchar *response, out: - if (match_info) - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (r); if (inner_error) { |