From 647e24460e2150784eefdb3e71364a4bd3a76a3f Mon Sep 17 00:00:00 2001 From: jsing Date: Mon, 14 Aug 2023 15:48:16 +0000 Subject: [PATCH] Inline INIT_DATA_* defines. ok tb@ --- lib/libcrypto/md5/md5.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/libcrypto/md5/md5.c b/lib/libcrypto/md5/md5.c index 19f0d83c479..be954d277e6 100644 --- a/lib/libcrypto/md5/md5.c +++ b/lib/libcrypto/md5/md5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.c,v 1.14 2023/08/14 15:26:01 jsing Exp $ */ +/* $OpenBSD: md5.c,v 1.15 2023/08/14 15:48:16 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -256,19 +256,16 @@ md5_block_data_order(MD5_CTX *c, const void *data_, size_t num) } #endif -#define INIT_DATA_A (unsigned long)0x67452301L -#define INIT_DATA_B (unsigned long)0xefcdab89L -#define INIT_DATA_C (unsigned long)0x98badcfeL -#define INIT_DATA_D (unsigned long)0x10325476L - int MD5_Init(MD5_CTX *c) { memset(c, 0, sizeof(*c)); - c->A = INIT_DATA_A; - c->B = INIT_DATA_B; - c->C = INIT_DATA_C; - c->D = INIT_DATA_D; + + c->A = 0x67452301UL; + c->B = 0xefcdab89UL; + c->C = 0x98badcfeUL; + c->D = 0x10325476UL; + return 1; } LCRYPTO_ALIAS(MD5_Init); -- 2.20.1