diff --git a/src/api.c b/src/api.c index b432b08..e3244e2 100644 --- a/src/api.c +++ b/src/api.c @@ -21,13 +21,6 @@ } \ } while (0) -#define DBUSERERR(line) do { \ - const int e = line; \ - if(e != SQLITE_OK && e != SQLITE_ROW && e != SQLITE_DONE) { \ - r = sqlite3_errmsg(connection); \ - } \ -} while(0) - static sqlite3 * connection = NULL; DECL int @@ -93,7 +86,7 @@ set_repo(const char * const who, const char * const link) } DECL int -rtos(void* data, +rtos(void * data, int argc, char** argv, char** colname @@ -128,8 +121,8 @@ DECL char * raw(const char * const sql) { char* errmsg; - char* r = (char*)calloc(sizeof(char), 10000); // TODO: allow for reallocing in rtos, start with a smaller value - DBUSERERR(sqlite3_exec(connection, sql, rtos, &r, &errmsg)); + char *r = (char*)calloc(sizeof(char), 10000); // TODO: allow for reallocing in rtos, start with a smaller value + sqlite3_exec(connection, sql, rtos, &r, &errmsg); if (errmsg){ free(r); r = errmsg;