1
0
Fork 0
forked from len0rd/rockbox

Correct checking return value of open in plugins.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23874 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2009-12-06 13:52:28 +00:00
parent e760a5abbf
commit 5cdd920d12
11 changed files with 20 additions and 14 deletions

View file

@ -133,7 +133,7 @@ bool custom_dir(void)
int i, errors = 0;
/* populate removed dirs array */
if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) > 0)
if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) >= 0)
{
while ((rb->read_line(fd2, line, MAX_PATH - 1)) > 0)
{
@ -148,7 +148,7 @@ bool custom_dir(void)
rb->close(fd2);
}
if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) > 0)
if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) >= 0)
{
while ((rb->read_line(fd2, line, MAX_PATH - 1)) > 0)
{