Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/acpitools/acpidump Don't choke on an assertion for ...



details:   https://anonhg.NetBSD.org/src/rev/f5f37eb58588
branches:  trunk
changeset: 794639:f5f37eb58588
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Mar 20 14:39:43 2014 +0000

description:
Don't choke on an assertion for an RSDT with a null address entry.

diffstat:

 usr.sbin/acpitools/acpidump/acpi.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 5f3f4812463f -r f5f37eb58588 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c        Thu Mar 20 13:40:02 2014 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c        Thu Mar 20 14:39:43 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.8 2011/02/17 10:18:05 jmcneill Exp $ */
+/* $NetBSD: acpi.c,v 1.9 2014/03/20 14:39:43 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.8 2011/02/17 10:18:05 jmcneill Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.9 2014/03/20 14:39:43 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -1949,9 +1949,8 @@
                        addr = le64toh(xsdt->TableOffsetEntry[i]);
                        break;
                default:
-                       addr = 0;
+                       assert((addr = 0));
                }
-               assert(addr != 0);
                printf("0x%08lx", addr);
        }
        printf(" }\n");



Home | Main Index | Thread Index | Old Index