aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-12-23 16:16:01 +0100
committerMax Kellermann <max@duempel.org>2010-12-23 16:23:20 +0100
commit5462f34ed037111d2d57638352b2f1a65a322579 (patch)
treed1acf3493d2d8edbbda9ae77a327d26ae249f3f9 /src/conf.c
parent0958ed584431ac09e676dd51925e56142416e7c2 (diff)
downloadmpd-5462f34ed037111d2d57638352b2f1a65a322579.tar.gz
mpd-5462f34ed037111d2d57638352b2f1a65a322579.tar.xz
mpd-5462f34ed037111d2d57638352b2f1a65a322579.zip
string_util: add function strchug_fast()
Replace g_strchug() calls with a cheaper implementation.
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf.c b/src/conf.c
index 3310da17e..c759a1940 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -270,7 +270,7 @@ config_read_block(FILE *fp, int *count, char *string, GError **error_r)
}
(*count)++;
- line = g_strchug(line);
+ line = strchug_fast(line);
if (*line == 0 || *line == CONF_COMMENT)
continue;
@@ -278,7 +278,7 @@ config_read_block(FILE *fp, int *count, char *string, GError **error_r)
/* end of this block; return from the function
(and from this "while" loop) */
- line = g_strchug(line + 1);
+ line = strchug_fast(line + 1);
if (*line != 0 && *line != CONF_COMMENT) {
config_param_free(ret);
g_set_error(error_r, config_quark(), 0,
@@ -356,7 +356,7 @@ config_read_file(const char *file, GError **error_r)
count++;
- line = g_strchug(string);
+ line = strchug_fast(string);
if (*line == 0 || *line == CONF_COMMENT)
continue;
@@ -402,7 +402,7 @@ config_read_file(const char *file, GError **error_r)
return false;
}
- line = g_strchug(line + 1);
+ line = strchug_fast(line + 1);
if (*line != 0 && *line != CONF_COMMENT) {
g_set_error(error_r, config_quark(), 0,
"line %i: Unknown tokens after '{'",