sticker/Database: remove redundant sqlite3_reset() calls

Call sqlite3_reset() only after a sqlite3_stmt* has been used, not
before.  Assume it is already in reusable state.
This commit is contained in:
Max Kellermann 2014-12-12 20:27:56 +01:00
parent 432ecd1b6a
commit 7dbe5f4640
1 changed files with 0 additions and 14 deletions

View File

@ -212,8 +212,6 @@ sticker_load_value(const char *type, const char *uri, const char *name)
if (*name == 0)
return std::string();
sqlite3_reset(stmt);
if (!BindAll(stmt, type, uri, name))
return std::string();
@ -249,8 +247,6 @@ sticker_list_values(std::map<std::string, std::string> &table,
assert(uri != nullptr);
assert(sticker_enabled());
sqlite3_reset(stmt);
if (!BindAll(stmt, type, uri))
return false;
@ -297,8 +293,6 @@ sticker_update_value(const char *type, const char *uri,
assert(sticker_enabled());
sqlite3_reset(stmt);
if (!BindAll(stmt, value, type, uri, name))
return false;
@ -335,8 +329,6 @@ sticker_insert_value(const char *type, const char *uri,
assert(sticker_enabled());
sqlite3_reset(stmt);
if (!BindAll(stmt, type, uri, name, value))
return false;
@ -384,8 +376,6 @@ sticker_delete(const char *type, const char *uri)
assert(type != nullptr);
assert(uri != nullptr);
sqlite3_reset(stmt);
if (!BindAll(stmt, type, uri))
return false;
@ -415,8 +405,6 @@ sticker_delete_value(const char *type, const char *uri, const char *name)
assert(type != nullptr);
assert(uri != nullptr);
sqlite3_reset(stmt);
if (!BindAll(stmt, type, uri, name))
return false;
@ -493,8 +481,6 @@ sticker_find(const char *type, const char *base_uri, const char *name,
assert(func != nullptr);
assert(sticker_enabled());
sqlite3_reset(stmt);
if (base_uri == nullptr)
base_uri = "";