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/chip8.c | |
| parent | e760a5abbf951fd22e1dd8eb116e344ad3d76a61 (diff) | |
| download | rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.zip rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.tar.gz rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.tar.bz2 rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.tar.xz | |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 3bdf950..7435518 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); |