From: Nikos Mavrogiannopoulos Date: Sat, 19 Apr 2014 16:28:04 +0000 (+0200) Subject: cleanups in output X-Git-Tag: gnutls_3_3_2~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba5228d438e4c5ea2803622f737b05263cbb7700;p=thirdparty%2Fgnutls.git cleanups in output --- diff --git a/lib/x509/output.c b/lib/x509/output.c index 33a1b28729..b581855676 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -724,12 +724,14 @@ print_altname(gnutls_buffer_st * str, const char *prefix, { unsigned int altname_idx; gnutls_datum_t t; + char *buffer; + size_t size; + int err; for (altname_idx = 0;; altname_idx++) { - char *buffer = NULL; - size_t size = 0; - int err; + buffer = NULL; + size = 0; if (altname_type == TYPE_CRT_SAN) err = gnutls_x509_crt_get_subject_alt_name(cert.crt, @@ -771,14 +773,14 @@ print_altname(gnutls_buffer_st * str, const char *prefix, return; } - if (altname_type == TYPE_CRT_SAN) + if (altname_type == TYPE_CRT_SAN) { err = gnutls_x509_crt_get_subject_alt_name(cert.crt, altname_idx, buffer, &size, NULL); - else if (altname_type == TYPE_CRQ_SAN) + } else if (altname_type == TYPE_CRQ_SAN) { err = gnutls_x509_crq_get_subject_alt_name(cert.crq, altname_idx, @@ -786,14 +788,14 @@ print_altname(gnutls_buffer_st * str, const char *prefix, &size, NULL, NULL); - else if (altname_type == TYPE_CRT_IAN) + } else if (altname_type == TYPE_CRT_IAN) { err = gnutls_x509_crt_get_issuer_alt_name(cert.crt, altname_idx, buffer, &size, NULL); - + } if (err < 0) { gnutls_free(buffer); addf(str,