From 955b8d8625adc13e4b48dd9284450e65b98a5b96 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 3 Dec 2007 16:17:28 +0000 Subject: [PATCH] better file open failure check (FSCORE-67) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6478 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/switch_core.c b/src/switch_core.c index 973cfc8e13..4f1d73f002 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -605,7 +605,8 @@ static void load_mime_types(void) mime_path = switch_mprintf("%s/%s", SWITCH_GLOBAL_dirs.conf_dir, cf); assert(mime_path); - if (!(fd = open(mime_path, O_RDONLY))) { + fd = open(mime_path, O_RDONLY); + if (fd <= 0) { return; }