artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b795296
)
zero sizeof a struct not sizeof the pointer to it
author
jsg
<jsg@openbsd.org>
Wed, 27 Jul 2016 01:36:37 +0000
(
01:36
+0000)
committer
jsg
<jsg@openbsd.org>
Wed, 27 Jul 2016 01:36:37 +0000
(
01:36
+0000)
ok mikeb@
sys/dev/pv/if_hvn.c
patch
|
blob
|
history
diff --git
a/sys/dev/pv/if_hvn.c
b/sys/dev/pv/if_hvn.c
index
c3aebfa
..
9bcc1ff
100644
(file)
--- 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)