summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-07-10 20:42:46 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-07-10 20:42:46 +0000
commit6fb35ac6b58e2f08000f01ea8fa74349dcc6f0bc (patch)
tree79c53f3bb90a9ceb7586584a80e0f2be4ba54b80
parent1c7c53f8b93c11297913c06a65271711bc454cf2 (diff)
Inline the only use of the HEX_SIZE macro and nuke both DECIMAL_SIZE and
HEX_SIZE. ok beck@ miod@
-rw-r--r--lib/libcrypto/asn1/a_strex.c4
-rw-r--r--lib/libcrypto/cryptlib.h6
2 files changed, 3 insertions, 7 deletions
diff --git a/lib/libcrypto/asn1/a_strex.c b/lib/libcrypto/asn1/a_strex.c
index 885b61efaf3..e2e21a22922 100644
--- a/lib/libcrypto/asn1/a_strex.c
+++ b/lib/libcrypto/asn1/a_strex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: a_strex.c,v 1.22 2014/06/12 15:49:27 deraadt Exp $ */
+/* $OpenBSD: a_strex.c,v 1.23 2014/07/10 20:42:45 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -131,7 +131,7 @@ do_esc_char(unsigned long c, unsigned char flags, char *do_quotes,
char_io *io_ch, void *arg)
{
unsigned char chflgs, chtmp;
- char tmphex[HEX_SIZE(long) + 3];
+ char tmphex[sizeof(long) * 2 + 3];
if (c > 0xffffffffL)
return -1;
diff --git a/lib/libcrypto/cryptlib.h b/lib/libcrypto/cryptlib.h
index bd4c4da3aaf..ad669a27452 100644
--- a/lib/libcrypto/cryptlib.h
+++ b/lib/libcrypto/cryptlib.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptlib.h,v 1.21 2014/07/10 20:02:58 jsing Exp $ */
+/* $OpenBSD: cryptlib.h,v 1.22 2014/07/10 20:42:45 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -76,10 +76,6 @@ extern "C" {
#define X509_CERT_DIR_EVP "SSL_CERT_DIR"
#define X509_CERT_FILE_EVP "SSL_CERT_FILE"
-/* size of string representations */
-#define DECIMAL_SIZE(type) ((sizeof(type)*8+2)/3+1)
-#define HEX_SIZE(type) (sizeof(type)*2)
-
void OPENSSL_cpuid_setup(void);
extern unsigned int OPENSSL_ia32cap_P[];
void OPENSSL_showfatal(const char *fmta,...);