From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUd2U-0007tc-1a for qemu-devel@nongnu.org; Sun, 08 Mar 2015 11:22:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUd2Q-0002cr-SY for qemu-devel@nongnu.org; Sun, 08 Mar 2015 11:22:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUd2Q-0002bx-LQ for qemu-devel@nongnu.org; Sun, 08 Mar 2015 11:22:42 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t28FMfnt012466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sun, 8 Mar 2015 11:22:41 -0400 Received: from redhat.com (ovpn-112-29.ams2.redhat.com [10.36.112.29]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t28FMdAC010052 for ; Sun, 8 Mar 2015 11:22:40 -0400 Date: Sun, 8 Mar 2015 16:22:38 +0100 From: "Michael S. Tsirkin" Message-ID: <1425828153-30617-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] aml-build: append opcodes using build_append_byte List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Opcodes are raw bytes, they shouldn't be added using build_append_int. This only happens to work with 0 and 1 opcodes. Signed-off-by: Michael S. Tsirkin --- hw/acpi/aml-build.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ff12b28..e01b8c2 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -112,7 +112,7 @@ build_append_namestringv(GArray *array, const char *format, va_list ap) switch (seg_count) { case 1: if (!*s) { - build_append_byte(array, 0x0); /* NullName */ + build_append_byte(array, 0x00); /* NullName */ } else { build_append_nameseg(array, s); } @@ -448,7 +448,7 @@ Aml *aml_and(Aml *arg1, Aml *arg2) Aml *var = aml_opcode(0x7B /* AndOp */); aml_append(var, arg1); aml_append(var, arg2); - build_append_int(var->buf, 0x00 /* NullNameOp */); + build_append_byte(var->buf, 0x00 /* NullNameOp */); return var; } @@ -546,7 +546,7 @@ Aml *aml_equal(Aml *arg1, Aml *arg2) Aml *var = aml_opcode(0x93 /* LequalOp */); aml_append(var, arg1); aml_append(var, arg2); - build_append_int(var->buf, 0x00); /* NullNameOp */ + build_append_byte(var->buf, 0x00); /* NullNameOp */ return var; } -- MST