Just in case sqlite expects this to be the case a la GError.
Also use NULL instead of 0 to initialize the error pointers elsewhere.
static void
try_create_table (sqlite3 *db)
{
- char *error = 0;
+ char *error = NULL;
if (sqlite3_exec (db, CREATE_TABLE, NULL, NULL, &error)) {
g_warning ("Failed to execute query: %s", error);
int (*callback)(void*,int,char**,char**),
void *argument)
{
- char *error = 0;
+ char *error = NULL;
gboolean try_create = TRUE;
try_exec:
try_create = FALSE;
try_create_table (db);
sqlite3_free (error);
+ error = NULL;
goto try_exec;
} else {
g_warning ("Failed to execute query: %s", error);