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:
Nils Wallménius 2009-08-06 18:28:38 +00:00
parent dbce22dc68
commit 2cab311635

View file

@ -1,6 +1,7 @@
/* A _very_ skeleton file to demonstrate building tagcache db on host. */
#include <stdio.h>
#include <sys/stat.h>
#include "tagcache.h"
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 */
bool file_exists(const char *file)
{
if (!stat(file))
struct stat s;
if (!stat(file, &s))
return true;
return false;
}