Fixed debug in cokebank
authorJohn Hodge <[email protected]>
Sat, 19 Feb 2011 03:31:35 +0000 (11:31 +0800)
committerJohn Hodge <[email protected]>
Sat, 19 Feb 2011 03:31:35 +0000 (11:31 +0800)
src/cokebank_sqlite/main.c

index bcb6735..504ec4e 100644 (file)
@@ -553,7 +553,9 @@ sqlite3_stmt *Bank_int_QuerySingle(sqlite3 *Database, const char *Query)
        // Prepare query
        ret = Bank_int_MakeStatemnt(Database, Query);
        if( !ret ) {
+               #if DEBUG
                printf("Bank_int_QuerySingle: RETURN NULL ret=NULL\n");
+               #endif
                return NULL;
        }
        
@@ -561,7 +563,9 @@ sqlite3_stmt *Bank_int_QuerySingle(sqlite3 *Database, const char *Query)
        rv = sqlite3_step(ret);
        // - Empty result set
        if( rv == SQLITE_DONE ) {
+               #if DEBUG
                printf("Bank_int_QuerySingle: RETURN NULL (rv == SQLITE_DONE)\n");
+               #endif
                return NULL;
        }
        // - Other error
@@ -571,7 +575,9 @@ sqlite3_stmt *Bank_int_QuerySingle(sqlite3 *Database, const char *Query)
                return NULL;
        }
        
+       #if DEBUG
        printf("Bank_int_QuerySingle: RETURN %p\n", ret);
+       #endif
        return ret;
 }
 

UCC git Repository :: git.ucc.asn.au