]> git.tue.mpg.de Git - paraslash.git/commitdiff
audioc: Use file_exists().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 14 Aug 2017 00:13:00 +0000 (02:13 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 22 Sep 2017 14:38:50 +0000 (16:38 +0200)
There is no need to open-code this function.

audioc.c

index 38151a530db38640e520c5eb8b2b668e5951d1d8..77a0539d2e4513a2e9cc3f926e303f264d08d3b8 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -287,12 +287,11 @@ __noreturn static void print_completions(void)
 static char *configfile_exists(void)
 {
        char *config_file;
-       struct stat statbuf;
        char *home = para_homedir();
 
        config_file = make_message("%s/.paraslash/audioc.conf", home);
        free(home);
-       if (!stat(config_file, &statbuf))
+       if (file_exists(config_file))
                return config_file;
        free(config_file);
        return NULL;