From: Greg Hudson Date: Wed, 25 Nov 2009 14:36:05 +0000 (+0000) Subject: In krb5_db2_db_init, make a format string constant to make Coverity X-Git-Tag: krb5-1.8-alpha1~147 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5af8ca71e81d35923ddc924346109bb4e3ca50b6;p=krb5.git In krb5_db2_db_init, make a format string constant to make Coverity happy. (Previously it was a disjunction of two constants, which is fine, but not as obviously safe to a static analysis tool.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23355 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/plugins/kdb/db2/kdb_db2.c b/src/plugins/kdb/db2/kdb_db2.c index 042649e49..50d427ef5 100644 --- a/src/plugins/kdb/db2/kdb_db2.c +++ b/src/plugins/kdb/db2/kdb_db2.c @@ -338,9 +338,8 @@ krb5_db2_db_init(krb5_context context) if ((retval = krb5_db2_db_get_age(context, NULL, &db_ctx->db_lf_time))) goto err_out; - snprintf(policy_db_name, sizeof(policy_db_name), - db_ctx->tempdb ? "%s~.kadm5" : "%s.kadm5", - db_ctx->db_name); + snprintf(policy_db_name, sizeof(policy_db_name), "%s%s.kadm5", + db_ctx->db_name, db_ctx->tempdb ? "~" : ""); snprintf(policy_lock_name, sizeof(policy_lock_name), "%s.lock", policy_db_name);