diff options
author | rbuj <[email protected]> | 2020-01-31 11:31:56 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2020-03-08 21:14:36 +0100 |
commit | 144ac2fb1395a76a04773c577965a8754f2dab3b (patch) | |
tree | 61820c300316ed7b1893160b53f0f4b7ae5c408e /src/glib-utils.c | |
parent | 3c6c1cef810b6a27ecf5142893bd960d6efb32f2 (diff) | |
download | engrampa-144ac2fb1395a76a04773c577965a8754f2dab3b.tar.bz2 engrampa-144ac2fb1395a76a04773c577965a8754f2dab3b.tar.xz |
glib-utils: remove n_fields function
Diffstat (limited to 'src/glib-utils.c')
-rw-r--r-- | src/glib-utils.c | 17 |
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, |