From: Avuton Olrich Date: Fri, 10 Feb 2012 03:25:04 +0000 (-0800) Subject: conf.c: Move system key binding filename building to a function X-Git-Tag: release-0.21~29 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c79085731c7e6e9a8fcdedeb4db7eb7f3b43db02;p=ncmpc.git conf.c: Move system key binding filename building to a function --- diff --git a/src/conf.c b/src/conf.c index 1aaa166..9ac3a56 100644 --- a/src/conf.c +++ b/src/conf.c @@ -648,6 +648,12 @@ build_user_key_binding_filename(void) #endif } +static char * +g_build_system_key_binding_filename(void) +{ + return g_build_filename(SYSCONFDIR, PACKAGE, "keys", NULL); +} + void read_configuration(void) { @@ -697,7 +703,7 @@ read_configuration(void) /* check for global key bindings SYSCONFDIR/ncmpc/keys */ if (filename == NULL) { - filename = g_build_filename(SYSCONFDIR, PACKAGE, "keys", NULL); + filename = g_build_system_key_binding_filename(); if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) { g_free(filename); filename = NULL;