From a836f9fa951e33a5186e2421413de0b50ed2233a Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 8 Dec 2017 15:17:12 -0500 Subject: Standardize syntax of sizeof(foo) Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/4876) --- crypto/asn1/a_strex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/asn1/a_strex.c') diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index 933dda99b7..b91266b3c5 100644 --- a/crypto/asn1/a_strex.c +++ b/crypto/asn1/a_strex.c @@ -73,13 +73,13 @@ static int do_esc_char(unsigned long c, unsigned short flags, char *do_quotes, if (c > 0xffffffffL) return -1; if (c > 0xffff) { - BIO_snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); + BIO_snprintf(tmphex, sizeof(tmphex), "\\W%08lX", c); if (!io_ch(arg, tmphex, 10)) return -1; return 10; } if (c > 0xff) { - BIO_snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); + BIO_snprintf(tmphex, sizeof(tmphex), "\\U%04lX", c); if (!io_ch(arg, tmphex, 6)) return -1; return 6; @@ -183,7 +183,7 @@ static int do_buf(unsigned char *buf, int buflen, if (type & BUF_TYPE_CONVUTF8) { unsigned char utfbuf[6]; int utflen; - utflen = UTF8_putc(utfbuf, sizeof utfbuf, c); + utflen = UTF8_putc(utfbuf, sizeof(utfbuf), c); for (i = 0; i < utflen; i++) { /* * We don't need to worry about setting orflags correctly @@ -478,7 +478,7 @@ static int do_name_ex(char_io *io_ch, void *arg, const X509_NAME *n, if (fn_opt != XN_FLAG_FN_NONE) { int objlen, fld_len; if ((fn_opt == XN_FLAG_FN_OID) || (fn_nid == NID_undef)) { - OBJ_obj2txt(objtmp, sizeof objtmp, fn, 1); + OBJ_obj2txt(objtmp, sizeof(objtmp), fn, 1); fld_len = 0; /* XXX: what should this be? */ objbuf = objtmp; } else { -- cgit v1.2.3