mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Use file_exists and dir_exists functions where appropriate, fix one wrong file descriptor check and one possible dir descriptor leak
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17147 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d65930f972
commit
a01996436d
8 changed files with 18 additions and 52 deletions
|
@ -46,7 +46,7 @@ int lang_load(const char *filename)
|
|||
int fd = open(filename, O_RDONLY);
|
||||
int retcode=0;
|
||||
unsigned char lang_header[3];
|
||||
if(fd == -1)
|
||||
if(fd < 0)
|
||||
return 1;
|
||||
fsize = filesize(fd) - 2;
|
||||
if(fsize <= MAX_LANGUAGE_SIZE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue