Code

conf.c: Move system key binding filename building to a function
authorAvuton Olrich <avuton@gmail.com>
Fri, 10 Feb 2012 03:25:04 +0000 (19:25 -0800)
committerAvuton Olrich <avuton@gmail.com>
Fri, 10 Feb 2012 03:25:04 +0000 (19:25 -0800)
src/conf.c

index 1aaa1666d2b1eae73d30e1c8eed4b1a6efd143cd..9ac3a5623d8d5d22acc4f5da3da883d6137111a9 100644 (file)
@@ -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;