From 697c3ac07625f09b6d62706a20afa598051d8a7c Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 27 Jun 2016 12:32:39 +0000 Subject: [PATCH] Correct the order of memset arguments. ok mikeb@ --- sys/dev/pv/hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c index 7f0bfcdf867..16d2d18413d 100644 --- a/sys/dev/pv/hyperv.c +++ b/sys/dev/pv/hyperv.c @@ -715,13 +715,13 @@ hv_vmbus_connect(struct hv_softc *sc) goto errout; } - memset(&cmd, sizeof(cmd), 0); + memset(&cmd, 0, sizeof(cmd)); cmd.hdr.message_type = HV_CHANMSG_INITIATED_CONTACT; cmd.interrupt_page = (uint64_t)epa; cmd.monitor_page_1 = (uint64_t)mpa1; cmd.monitor_page_2 = (uint64_t)mpa2; - memset(&rsp, sizeof(rsp), 0); + memset(&rsp, 0, sizeof(rsp)); for (i = 0; versions[i] != HV_VMBUS_VERSION_INVALID; i++) { cmd.vmbus_version_requested = versions[i]; -- 2.20.1