Skip to content

Commit

Permalink
Assert that we get the assumed return value from sqlite3_step(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift authored and cdecker committed Feb 19, 2018
1 parent f351417 commit 4fccbba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,8 @@ static bool wallet_ever_used(struct wallet *w)
/* Or if they do a unilateral close, the output to us provides a UTXO. */
stmt = db_query(__func__, w->db,
"SELECT COUNT(*) FROM outputs WHERE commitment_point IS NOT NULL;");
sqlite3_step(stmt);
int ret = sqlite3_step(stmt);
assert(ret == SQLITE_ROW);
channel_utxos = (sqlite3_column_int(stmt, 0) != 0);
sqlite3_finalize(stmt);

Expand Down

0 comments on commit 4fccbba

Please sign in to comment.