cinterion: minor coding style fixes in new band management

This commit is contained in:
Aleksander Morgado
2020-05-26 11:14:48 +02:00
parent 793132d56d
commit 87b8c9b295

View File

@@ -333,7 +333,8 @@ mm_cinterion_parse_scfg_test (const gchar *response,
} }
finish: finish:
if (!bands && !inner_error) /* set error only if not already given */ /* set error only if not already given */
if (!bands && !inner_error)
inner_error = g_error_new (MM_CORE_ERROR, inner_error = g_error_new (MM_CORE_ERROR,
MM_CORE_ERROR_FAILED, MM_CORE_ERROR_FAILED,
"No valid bands found in ^SCFG=? response"); "No valid bands found in ^SCFG=? response");
@@ -441,7 +442,7 @@ mm_cinterion_parse_scfg_response (const gchar *response,
} }
} }
} }
} else { /* format == MM_CINTERION_RADIO_BAND_FORMAT_MULTIPLE */ } else if (format == MM_CINTERION_RADIO_BAND_FORMAT_MULTIPLE) {
r = g_regex_new ("\\^SCFG:\\s*\"Radio/Band/([234]G)\",\"?([0-9A-Fa-fx]*)\"?,?\"?([0-9A-Fa-fx]*)?\"?", r = g_regex_new ("\\^SCFG:\\s*\"Radio/Band/([234]G)\",\"?([0-9A-Fa-fx]*)\"?,?\"?([0-9A-Fa-fx]*)?\"?",
0, 0, NULL); 0, 0, NULL);
g_assert (r != NULL); g_assert (r != NULL);
@@ -476,10 +477,12 @@ mm_cinterion_parse_scfg_response (const gchar *response,
g_match_info_next (match_info, NULL); g_match_info_next (match_info, NULL);
} }
} } else
g_assert_not_reached ();
finish: finish:
if (!bands && !inner_error) /* set error only if not already given */ /* set error only if not already given */
if (!bands && !inner_error)
inner_error = g_error_new (MM_CORE_ERROR, inner_error = g_error_new (MM_CORE_ERROR,
MM_CORE_ERROR_FAILED, MM_CORE_ERROR_FAILED,
"No valid bands found in ^SCFG response"); "No valid bands found in ^SCFG response");