forked from len0rd/rockbox
Fix crash in the database utility, turns out passing too few arguments for stat() isn't the best idea :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22190 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dbce22dc68
commit
2cab311635
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
/* A _very_ skeleton file to demonstrate building tagcache db on host. */
|
/* A _very_ skeleton file to demonstrate building tagcache db on host. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include "tagcache.h"
|
#include "tagcache.h"
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
@ -15,7 +16,8 @@ int main(int argc, char **argv)
|
||||||
/* stub to avoid including all of apps/misc.c */
|
/* stub to avoid including all of apps/misc.c */
|
||||||
bool file_exists(const char *file)
|
bool file_exists(const char *file)
|
||||||
{
|
{
|
||||||
if (!stat(file))
|
struct stat s;
|
||||||
|
if (!stat(file, &s))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue