From 2cab3116356e377fe0c3073ce679b69478553565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Thu, 6 Aug 2009 18:28:38 +0000 Subject: 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 --- tools/database/database.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/database/database.c') diff --git a/tools/database/database.c b/tools/database/database.c index a8be48a..1f398c0 100644 --- a/tools/database/database.c +++ b/tools/database/database.c @@ -1,6 +1,7 @@ /* A _very_ skeleton file to demonstrate building tagcache db on host. */ #include +#include #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; } -- cgit v1.1