diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2009-12-06 13:52:28 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2009-12-06 13:52:28 +0000 |
commit | 5cdd920d1267a7548ab492864c4a20a20c3d93ff (patch) | |
tree | 518ddb3cbbf4eabcb8ca0941e386a285c56b53bb /apps/plugins/random_folder_advance_config.c | |
parent | e760a5abbf951fd22e1dd8eb116e344ad3d76a61 (diff) | |
download | rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.tar.gz rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.zip |
Correct checking return value of open in plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23874 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/random_folder_advance_config.c')
-rw-r--r-- | apps/plugins/random_folder_advance_config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index ba3f0d3f7e..36b9ebfcbf 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -133,7 +133,7 @@ bool custom_dir(void) | |||
133 | int i, errors = 0; | 133 | int i, errors = 0; |
134 | 134 | ||
135 | /* populate removed dirs array */ | 135 | /* populate removed dirs array */ |
136 | if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) > 0) | 136 | if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) >= 0) |
137 | { | 137 | { |
138 | while ((rb->read_line(fd2, line, MAX_PATH - 1)) > 0) | 138 | while ((rb->read_line(fd2, line, MAX_PATH - 1)) > 0) |
139 | { | 139 | { |
@@ -148,7 +148,7 @@ bool custom_dir(void) | |||
148 | rb->close(fd2); | 148 | rb->close(fd2); |
149 | } | 149 | } |
150 | 150 | ||
151 | if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) > 0) | 151 | if((fd2 = rb->open(RFADIR_FILE,O_RDONLY)) >= 0) |
152 | { | 152 | { |
153 | while ((rb->read_line(fd2, line, MAX_PATH - 1)) > 0) | 153 | while ((rb->read_line(fd2, line, MAX_PATH - 1)) > 0) |
154 | { | 154 | { |