diff options
| author | Nils Wallménius <nils@rockbox.org> | 2008-04-16 19:51:43 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2008-04-16 19:51:43 +0000 |
| commit | a01996436d09eca8ae114e67005d2cac73cae7b3 (patch) | |
| tree | 013d6787d3c03265049536677e817572c4285119 /apps/main.c | |
| parent | d65930f9720b0d51313b0e76251e56d2ffa144dd (diff) | |
| download | rockbox-a01996436d09eca8ae114e67005d2cac73cae7b3.zip rockbox-a01996436d09eca8ae114e67005d2cac73cae7b3.tar.gz rockbox-a01996436d09eca8ae114e67005d2cac73cae7b3.tar.bz2 rockbox-a01996436d09eca8ae114e67005d2cac73cae7b3.tar.xz | |
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
Diffstat (limited to 'apps/main.c')
| -rw-r--r-- | apps/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/main.c b/apps/main.c index 7309d95..543f476 100644 --- a/apps/main.c +++ b/apps/main.c @@ -574,13 +574,10 @@ static void init(void) #ifdef AUTOROCK { - int fd; static const char filename[] = PLUGIN_APPS_DIR "/autostart.rock"; - fd = open(filename, O_RDONLY); - if(fd >= 0) /* no complaint if it doesn't exist */ + if(file_exists(filename)) /* no complaint if it doesn't exist */ { - close(fd); plugin_load((char*)filename, NULL); /* start if it does */ } } |