diff options
author | Neal H. Walfield <neal@g10code.com> | 2016-11-21 21:13:15 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@g10code.com> | 2016-11-21 21:13:15 +0100 |
commit | 7142b293c870d73ce0146bfb90e6a556e0079650 (patch) | |
tree | e53dd26192a0a306241cdbfd393f835e4a9d12c2 | |
parent | g10: Add a convenience function for checking if a key is a primary key (diff) | |
download | gnupg2-7142b293c870d73ce0146bfb90e6a556e0079650.tar.xz gnupg2-7142b293c870d73ce0146bfb90e6a556e0079650.zip |
g10: Don't use the same variable for multiple SQL compiled statements
* g10/tofu.c (struct tofu_dbs_s): Remove unused field
record_binding_update2. Replace register_insert with
register_signature and register_encryption.
(tofu_register_signature): Don't use dbs->s.register_insert, but
dbs->s.register_signature.
(tofu_register_encryption): Don't use dbs->s.register_insert, but
dbs->s.register_encryption.
Signed-off-by: Neal H. Walfield <neal@g10code.com>
-rw-r--r-- | g10/tofu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/tofu.c b/g10/tofu.c index 05d171d58..deccc0f26 100644 --- a/g10/tofu.c +++ b/g10/tofu.c @@ -79,14 +79,14 @@ struct tofu_dbs_s sqlite3_stmt *record_binding_get_old_policy; sqlite3_stmt *record_binding_update; - sqlite3_stmt *record_binding_update2; sqlite3_stmt *get_policy_select_policy_and_conflict; sqlite3_stmt *get_trust_bindings_with_this_email; sqlite3_stmt *get_trust_gather_other_user_ids; sqlite3_stmt *get_trust_gather_signature_stats; sqlite3_stmt *get_trust_gather_encryption_stats; sqlite3_stmt *register_already_seen; - sqlite3_stmt *register_insert; + sqlite3_stmt *register_signature; + sqlite3_stmt *register_encryption; } s; int in_batch_transaction; @@ -3093,7 +3093,7 @@ tofu_register_signature (ctrl_t ctrl, log_assert (c == 0); rc = gpgsql_stepx - (dbs->db, &dbs->s.register_insert, NULL, NULL, &err, + (dbs->db, &dbs->s.register_signature, NULL, NULL, &err, "insert into signatures\n" " (binding, sig_digest, origin, sig_time, time)\n" " values\n" @@ -3209,7 +3209,7 @@ tofu_register_encryption (ctrl_t ctrl, } rc = gpgsql_stepx - (dbs->db, &dbs->s.register_insert, NULL, NULL, &err, + (dbs->db, &dbs->s.register_encryption, NULL, NULL, &err, "insert into encryptions\n" " (binding, time)\n" " values\n" |