From 80dda539521525796e97c6d3545ebcacb90b48d1 Mon Sep 17 00:00:00 2001 From: visa Date: Fri, 23 Feb 2018 15:41:08 +0000 Subject: [PATCH] Drop redundant bzero() calls. ses_ghash is allocated with M_ZERO, so it is unnecessary to zero the struct's fields right after allocation. OK mikeb@ --- sys/arch/amd64/amd64/aesni.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/arch/amd64/amd64/aesni.c b/sys/arch/amd64/amd64/aesni.c index 60f05f660ca..e2e4ffd7b1b 100644 --- a/sys/arch/amd64/amd64/aesni.c +++ b/sys/arch/amd64/amd64/aesni.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aesni.c,v 1.42 2017/09/08 05:36:51 deraadt Exp $ */ +/* $OpenBSD: aesni.c,v 1.43 2018/02/23 15:41:08 visa Exp $ */ /*- * Copyright (c) 2003 Jason Wright * Copyright (c) 2003, 2004 Theo de Raadt @@ -251,10 +251,6 @@ aesni_newsession(u_int32_t *sidp, struct cryptoini *cri) return (ENOMEM); } - bzero(ses->ses_ghash->H, GMAC_BLOCK_LEN); - bzero(ses->ses_ghash->S, GMAC_BLOCK_LEN); - bzero(ses->ses_ghash->Z, GMAC_BLOCK_LEN); - /* prepare a hash subkey */ aesni_enc(ses, ses->ses_ghash->H, ses->ses_ghash->H); break; -- 2.20.1