summaryrefslogtreecommitdiffstats
path: root/apps/plugins/chip8.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2009-12-06 13:52:28 +0000
committerTeruaki Kawashima <teru@rockbox.org>2009-12-06 13:52:28 +0000
commit5cdd920d1267a7548ab492864c4a20a20c3d93ff (patch)
tree518ddb3cbbf4eabcb8ca0941e386a285c56b53bb /apps/plugins/chip8.c
parente760a5abbf951fd22e1dd8eb116e344ad3d76a61 (diff)
downloadrockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.tar.gz
rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.tar.bz2
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/chip8.c')
-rw-r--r--apps/plugins/chip8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index 3bdf95093a..7435518855 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -1329,7 +1329,7 @@ static bool chip8_init(const char* file)
int i;
fd = rb->open(file, O_RDONLY);
- if (fd==-1) {
+ if (fd < 0) {
rb->lcd_puts(0, 6, "File Error.");
return false;
}
@@ -1351,7 +1351,7 @@ static bool chip8_init(const char* file)
c8kname[len-2] = '8';
c8kname[len-1] = 'k';
fd = rb->open(c8kname, O_RDONLY);
- if (fd!=-1) {
+ if (fd >= 0) {
rb->lcd_puts(0, 6, "File&Keymap OK.");
numread = rb->read(fd, chip8_keymap, 16);
rb->close(fd);