From: Matt Fleming Date: Mon, 6 Jun 2011 17:19:02 +0000 (+0100) Subject: core: open_file() returns a non-negative handle id X-Git-Tag: syslinux-5.00-pre1~41^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f181c7083a188d7c189323990057b55374908449;p=platform%2Fupstream%2Fsyslinux.git core: open_file() returns a non-negative handle id We currently only take the success path if open_file() returns 0 but open_file() returns a handle ID which is a non-negative number. Signed-off-by: Matt Fleming --- diff --git a/core/fs/lib/searchconfig.c b/core/fs/lib/searchconfig.c index 8e53ebc..fb7322b 100644 --- a/core/fs/lib/searchconfig.c +++ b/core/fs/lib/searchconfig.c @@ -26,7 +26,7 @@ int search_config(struct com32_filedata *filedata, sf); realpath(ConfigName, confignamebuf, FILENAME_MAX); dprintf("Config search: %s\n", ConfigName); - if (!open_file(ConfigName, filedata)) { + if (open_file(ConfigName, filedata) >= 0) { chdir(sd); return 0; /* Got it */ }