misc: use g_regex_match() for simplicity

This CL converts a few g_regex_match_full() expressions to their
equivalent g_regex_match() in order to simplify the code, i.e.

  g_regex_match_full (regex, str, strlen (str), 0, 0, &match_info, NULL)

is equivalent to:

  g_regex_match_full (regex, str, -1, 0, 0, &match_info, NULL)

or simply:

  g_regex_match (regex, str, 0, &match_info)
This commit is contained in:
Ben Chan
2019-07-10 14:48:22 -07:00
parent ea93aad8a4
commit 8d8b3a722a
5 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ wwsm_read_ready (MMBaseModem *self,
r = g_regex_new ("\\r\\n\\+WWSM: ([0-2])(,([0-2]))?.*$", 0, 0, NULL);
g_assert (r != NULL);
if (g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, NULL)) {
if (g_regex_match (r, response, 0, &match_info)) {
guint allowed = 0;
if (mm_get_uint_from_match_info (match_info, 1, &allowed)) {