summaryrefslogtreecommitdiff
path: root/src/conf-parser.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-08-01 02:39:22 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-01 02:39:22 +0200
commit44d91056924e1e64699892f71121b40c46489e57 (patch)
tree1ef1841e1e3a92f75519e7a3e3635ad078dc15a0 /src/conf-parser.c
parent70132bd0425ce0a65ed24197a2bcbf1cb2931352 (diff)
util: use join() instead of asprintf() as an optimization
Diffstat (limited to 'src/conf-parser.c')
-rw-r--r--src/conf-parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf-parser.c b/src/conf-parser.c
index a99c70596b..3bb430e375 100644
--- a/src/conf-parser.c
+++ b/src/conf-parser.c
@@ -88,7 +88,8 @@ int config_item_perf_lookup(
else {
char *key;
- if (asprintf(&key, "%s.%s", section, lvalue) < 0)
+ key = join(section, ".", lvalue, NULL);
+ if (!key)
return -ENOMEM;
p = lookup(key, strlen(key));