summaryrefslogtreecommitdiff
path: root/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'alias.c')
-rw-r--r--alias.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/alias.c b/alias.c
index 5efc3d6986..758c867149 100644
--- a/alias.c
+++ b/alias.c
@@ -5,7 +5,8 @@ static char *alias_val;
static int alias_lookup_cb(const char *k, const char *v, void *cb)
{
- if (starts_with(k, "alias.") && !strcmp(k + 6, alias_key)) {
+ const char *name;
+ if (skip_prefix(k, "alias.", &name) && !strcmp(name, alias_key)) {
if (!v)
return config_error_nonbool(k);
alias_val = xstrdup(v);