From 3efad746f330e45354e46f787cbc95902f6d873d Mon Sep 17 00:00:00 2001 From: guenther Date: Fri, 7 Apr 2017 04:45:24 +0000 Subject: [PATCH] Simplify the size calculation for memset() From Anton Lindqvist (anton.lindqvist(at)gmail.com) --- sys/dev/acpi/acpicpu.c | 6 +++--- 1 file 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 * Copyright (c) 2015 Philip Guenther @@ -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); -- 2.20.1