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/midi | |
| 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/midi')
| -rw-r--r-- | apps/plugins/midi/guspat.c | 2 | ||||
| -rw-r--r-- | apps/plugins/midi/midifile.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c index 124f779..5f6ba35 100644 --- a/apps/plugins/midi/guspat.c +++ b/apps/plugins/midi/guspat.c @@ -160,7 +160,7 @@ struct GPatch * gusload(char * filename) int file = rb->open(filename, O_RDONLY); - if(file == -1) + if(file < 0) { char message[50]; rb->snprintf(message, 50, "Error opening %s", filename); diff --git a/apps/plugins/midi/midifile.c b/apps/plugins/midi/midifile.c index 84e8b56..b5d9c5b 100644 --- a/apps/plugins/midi/midifile.c +++ b/apps/plugins/midi/midifile.c @@ -31,7 +31,7 @@ struct MIDIfile * loadFile(const char * filename) struct MIDIfile * mfload; int file = rb->open (filename, O_RDONLY); - if(file==-1) + if(file < 0) { printf("Could not open file"); return NULL; |