diff options
author | Brian Smith <brian@briansmith.org> | 2016-01-17 22:18:26 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-01-21 23:56:59 +0300 |
commit | 0687bdfc12e7ce5832610465d12c69040d1c714b (patch) | |
tree | 61ffc5db66d008fb927eb81d8c3545c9b58be0ae | |
parent | 6c22f542f42eccb0de7f43edf27aa1255c7be7e2 (diff) |
Fix -Wformat-nonliteral violation in ssl_cipher.c.
Besides avoiding the -Wformat-nonliteral warning, it is easier to
review (changes to) the code when the format string is passed to the
function as a literal.
Change-Id: I5093ad4494d5ebeea3f2671509b916cd6c5fb173
Reviewed-on: https://boringssl-review.googlesource.com/6908
Reviewed-by: David Benjamin <davidben@google.com>
-rw-r--r-- | ssl/ssl_cipher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_cipher.c b/ssl/ssl_cipher.c index 77fa8fa6..ba738488 100644 --- a/ssl/ssl_cipher.c +++ b/ssl/ssl_cipher.c @@ -1804,7 +1804,6 @@ const char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) { const char *kx, *au, *enc, *mac; uint32_t alg_mkey, alg_auth, alg_enc, alg_mac; - static const char *format = "%-23s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s\n"; alg_mkey = cipher->algorithm_mkey; alg_auth = cipher->algorithm_auth; @@ -1928,7 +1927,8 @@ const char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, return "Buffer too small"; } - BIO_snprintf(buf, len, format, cipher->name, kx, au, enc, mac); + BIO_snprintf(buf, len, "%-23s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s\n", + cipher->name, kx, au, enc, mac); return buf; } |