From bded7196669a7cb4806ad2e787d130393e1e5236 Mon Sep 17 00:00:00 2001 From: guenther Date: Sun, 20 Apr 2014 20:06:19 +0000 Subject: [PATCH] Restore beck's (void)snprintf(): they were reviewed. --- lib/libcrypto/x509/by_dir.c | 2 +- lib/libcrypto/x509/x509_txt.c | 4 ++-- lib/libcrypto/x509v3/v3_alt.c | 4 ++-- lib/libssl/src/crypto/x509/by_dir.c | 2 +- lib/libssl/src/crypto/x509/x509_txt.c | 4 ++-- lib/libssl/src/crypto/x509v3/v3_alt.c | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/libcrypto/x509/by_dir.c b/lib/libcrypto/x509/by_dir.c index 295389bcb3b..fdfca6140ad 100644 --- a/lib/libcrypto/x509/by_dir.c +++ b/lib/libcrypto/x509/by_dir.c @@ -336,7 +336,7 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, hent = NULL; } for (;;) { - snprintf(b->data, b->max, "%s/%08lx.%s%d", + (void) snprintf(b->data, b->max, "%s/%08lx.%s%d", ent->dir, h, postfix, k); #ifndef OPENSSL_NO_POSIX_IO diff --git a/lib/libcrypto/x509/x509_txt.c b/lib/libcrypto/x509/x509_txt.c index 31a909a12ca..3fb3b12355f 100644 --- a/lib/libcrypto/x509/x509_txt.c +++ b/lib/libcrypto/x509/x509_txt.c @@ -184,7 +184,7 @@ X509_verify_cert_error_string(long n) return("CRL path validation error"); default: - snprintf(buf, sizeof buf, "error number %ld", n); - return (buf); + (void) snprintf(buf, sizeof buf, "error number %ld", n); + return(buf); } } diff --git a/lib/libcrypto/x509v3/v3_alt.c b/lib/libcrypto/x509v3/v3_alt.c index 95b1fa4c975..636677df94a 100644 --- a/lib/libcrypto/x509v3/v3_alt.c +++ b/lib/libcrypto/x509v3/v3_alt.c @@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, case GEN_IPADD: p = gen->d.ip->data; if(gen->d.ip->length == 4) - snprintf(oline, sizeof oline, + (void) snprintf(oline, sizeof oline, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); else if(gen->d.ip->length == 16) { oline[0] = 0; for (i = 0; i < 8; i++) { - snprintf(htmp, sizeof htmp, + (void) snprintf(htmp, sizeof htmp, "%X", p[0] << 8 | p[1]); p += 2; strlcat(oline, htmp, sizeof(oline)); diff --git a/lib/libssl/src/crypto/x509/by_dir.c b/lib/libssl/src/crypto/x509/by_dir.c index 295389bcb3b..fdfca6140ad 100644 --- a/lib/libssl/src/crypto/x509/by_dir.c +++ b/lib/libssl/src/crypto/x509/by_dir.c @@ -336,7 +336,7 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, hent = NULL; } for (;;) { - snprintf(b->data, b->max, "%s/%08lx.%s%d", + (void) snprintf(b->data, b->max, "%s/%08lx.%s%d", ent->dir, h, postfix, k); #ifndef OPENSSL_NO_POSIX_IO diff --git a/lib/libssl/src/crypto/x509/x509_txt.c b/lib/libssl/src/crypto/x509/x509_txt.c index 31a909a12ca..3fb3b12355f 100644 --- a/lib/libssl/src/crypto/x509/x509_txt.c +++ b/lib/libssl/src/crypto/x509/x509_txt.c @@ -184,7 +184,7 @@ X509_verify_cert_error_string(long n) return("CRL path validation error"); default: - snprintf(buf, sizeof buf, "error number %ld", n); - return (buf); + (void) snprintf(buf, sizeof buf, "error number %ld", n); + return(buf); } } diff --git a/lib/libssl/src/crypto/x509v3/v3_alt.c b/lib/libssl/src/crypto/x509v3/v3_alt.c index 95b1fa4c975..636677df94a 100644 --- a/lib/libssl/src/crypto/x509v3/v3_alt.c +++ b/lib/libssl/src/crypto/x509v3/v3_alt.c @@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, case GEN_IPADD: p = gen->d.ip->data; if(gen->d.ip->length == 4) - snprintf(oline, sizeof oline, + (void) snprintf(oline, sizeof oline, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); else if(gen->d.ip->length == 16) { oline[0] = 0; for (i = 0; i < 8; i++) { - snprintf(htmp, sizeof htmp, + (void) snprintf(htmp, sizeof htmp, "%X", p[0] << 8 | p[1]); p += 2; strlcat(oline, htmp, sizeof(oline)); -- 2.20.1