for_each_recent_reflog_ent(): simplify opening of a reflog file
[gitweb.git] / builtin / config.c
index ada6e1211462558f307dce6142b7b65d641c8e02..442ccc2497c4e2e889d9de55359e36a1db07c1a4 100644 (file)
@@ -400,8 +400,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                         */
                        die("$HOME not set");
 
-               if (access(user_config, R_OK) &&
-                   xdg_config && !access(xdg_config, R_OK))
+               if (access_or_warn(user_config, R_OK) &&
+                   xdg_config && !access_or_warn(xdg_config, R_OK))
                        given_config_file = xdg_config;
                else
                        given_config_file = user_config;