aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rwxr-xr-xconfig.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/config.c b/config.c
index beb2f4df3..16c154742 100755
--- a/config.c
+++ b/config.c
@@ -572,10 +572,9 @@ static struct ast_config *config_text_file_load(const char *database, const char
ast_copy_string(fn, globbuf.gl_pathv[i], sizeof(fn));
#endif
do {
- if (stat(fn, &statbuf)) {
- ast_log(LOG_WARNING, "Cannot stat() '%s', ignoring\n", fn);
+ if (stat(fn, &statbuf))
continue;
- }
+
if (!S_ISREG(statbuf.st_mode)) {
ast_log(LOG_WARNING, "'%s' is not a regular file, ignoring\n", fn);
continue;