Restore beck's (void)snprintf(): they were reviewed.
authorguenther <guenther@openbsd.org>
Sun, 20 Apr 2014 20:06:19 +0000 (20:06 +0000)
committerguenther <guenther@openbsd.org>
Sun, 20 Apr 2014 20:06:19 +0000 (20:06 +0000)
lib/libcrypto/x509/by_dir.c
lib/libcrypto/x509/x509_txt.c
lib/libcrypto/x509v3/v3_alt.c
lib/libssl/src/crypto/x509/by_dir.c
lib/libssl/src/crypto/x509/x509_txt.c
lib/libssl/src/crypto/x509v3/v3_alt.c

index 295389b..fdfca61 100644 (file)
@@ -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
index 31a909a..3fb3b12 100644 (file)
@@ -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);
        }
 }
index 95b1fa4..636677d 100644 (file)
@@ -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));
index 295389b..fdfca61 100644 (file)
@@ -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
index 31a909a..3fb3b12 100644 (file)
@@ -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);
        }
 }
index 95b1fa4..636677d 100644 (file)
@@ -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));