From 810ac3605ebb69f40bc4526e3910b84d9ebe01e1 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 27 Jul 2016 01:36:37 +0000 Subject: [PATCH] zero sizeof a struct not sizeof the pointer to it ok mikeb@ --- sys/dev/pv/if_hvn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pv/if_hvn.c b/sys/dev/pv/if_hvn.c index c3aebfa9fb9..9bcc1ffae2a 100644 --- a/sys/dev/pv/if_hvn.c +++ b/sys/dev/pv/if_hvn.c @@ -675,7 +675,7 @@ hvn_nvsp_attach(struct hvn_softc *sc) mtx_init(&sc->sc_nvsplck, IPL_NET); - memset(pkt, 0, sizeof(pkt)); + memset(pkt, 0, sizeof(*pkt)); pkt->msg_type = nvsp_type_init; init = (struct nvsp_init *)&pkt->msg; @@ -696,7 +696,7 @@ hvn_nvsp_attach(struct hvn_softc *sc) return (-1); } - memset(pkt, 0, sizeof(pkt)); + memset(pkt, 0, sizeof(*pkt)); pkt->msg_type = nvsp_type_send_ndis_vers; ver = (struct nvsp_send_ndis_version *)&pkt->msg; if (sc->sc_proto <= NVSP_PROTOCOL_VERSION_4) -- 2.20.1