summaryrefslogtreecommitdiff
path: root/src/glib-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glib-utils.c')
-rw-r--r--src/glib-utils.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/glib-utils.c b/src/glib-utils.c
index cffa591..ed42dd7 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -378,7 +378,7 @@ search_util_get_regexps (const char *pattern_string,
if (patterns == NULL)
return NULL;
- regexps = g_new0 (GRegex*, n_fields (patterns) + 1);
+ regexps = g_new0 (GRegex*, g_strv_length (patterns) + 1);
for (i = 0; patterns[i] != NULL; i++)
regexps[i] = g_regex_new (patterns[i],
G_REGEX_OPTIMIZE | compile_options,
@@ -452,21 +452,6 @@ get_last_field (const char *line,
}
-int
-n_fields (char **str_array)
-{
- int i;
-
- if (str_array == NULL)
- return 0;
-
- i = 0;
- while (str_array[i] != NULL)
- i++;
- return i;
-}
-
-
void
debug (const char *file,
int line,