summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-04-07 04:45:24 +0000
committerguenther <guenther@openbsd.org>2017-04-07 04:45:24 +0000
commit3efad746f330e45354e46f787cbc95902f6d873d (patch)
tree1e4817684058c3b056c963fbd1b0b5d41a858ab6
parentInspired by recent dhcrelay(8) changes add some stricter CFLAGS. No code (diff)
downloadwireguard-openbsd-3efad746f330e45354e46f787cbc95902f6d873d.tar.xz
wireguard-openbsd-3efad746f330e45354e46f787cbc95902f6d873d.zip
Simplify the size calculation for memset()
From Anton Lindqvist (anton.lindqvist(at)gmail.com)
-rw-r--r--sys/dev/acpi/acpicpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpicpu.c b/sys/dev/acpi/acpicpu.c
index 9f372c2e89a..182dc87e437 100644
--- a/sys/dev/acpi/acpicpu.c
+++ b/sys/dev/acpi/acpicpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpicpu.c,v 1.78 2016/09/18 23:56:45 guenther Exp $ */
+/* $OpenBSD: acpicpu.c,v 1.79 2017/04/07 04:45:24 guenther Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
@@ -240,7 +240,7 @@ acpicpu_set_pdc(struct acpicpu_softc *sc)
if (aml_searchname(sc->sc_devnode, "_OSC")) {
/* Query _OSC */
- memset(&osc_cmd, 0, sizeof(cmd) * 4);
+ memset(&osc_cmd, 0, sizeof(osc_cmd));
osc_cmd[0].type = AML_OBJTYPE_BUFFER;
osc_cmd[0].v_buffer = (uint8_t *)&cpu_oscuuid;
osc_cmd[0].length = sizeof(cpu_oscuuid);
@@ -269,7 +269,7 @@ acpicpu_set_pdc(struct acpicpu_softc *sc)
}
/* Evaluate _OSC */
- memset(&osc_cmd, 0, sizeof(cmd) * 4);
+ memset(&osc_cmd, 0, sizeof(osc_cmd));
osc_cmd[0].type = AML_OBJTYPE_BUFFER;
osc_cmd[0].v_buffer = (uint8_t *)&cpu_oscuuid;
osc_cmd[0].length = sizeof(cpu_oscuuid);