From 75b85153a5bd0fee7feae5c20ba5928715d0cffb Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 14 Aug 2017 02:13:00 +0200 Subject: [PATCH] audioc: Use file_exists(). There is no need to open-code this function. --- audioc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.39.5