From: Andre Noll Date: Mon, 14 Aug 2017 00:13:00 +0000 (+0200) Subject: audioc: Use file_exists(). X-Git-Tag: v0.6.1~4 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=75b85153a5bd0fee7feae5c20ba5928715d0cffb;hp=3256f3c144a66a50423d025c13564035c22230f7 audioc: Use file_exists(). There is no need to open-code this function. --- diff --git a/audioc.c b/audioc.c index 38151a53..77a0539d 100644 --- 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;