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 CID 1354301, 1354302, 1354303: F...



details:   https://anonhg.NetBSD.org/src/rev/21a6d7b23c4e
branches:  trunk
changeset: 343805:21a6d7b23c4e
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 27 16:40:22 2016 +0000

description:
CID 1354301, 1354302, 1354303: Fix uninitialized variable.

diffstat:

 usr.sbin/acpitools/acpidump/acpi.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 4bf9d35509cc -r 21a6d7b23c4e usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c        Sat Feb 27 16:31:31 2016 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c        Sat Feb 27 16:40:22 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.14 2016/02/01 17:46:22 christos Exp $ */
+/* $NetBSD: acpi.c,v 1.15 2016/02/27 16:40:22 christos Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.14 2016/02/01 17:46:22 christos Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.15 2016/02/27 16:40:22 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -1950,7 +1950,7 @@
        ACPI_TABLE_RSDT *rsdt;
        ACPI_TABLE_XSDT *xsdt;
        int     i, entries;
-       u_long  addr;
+       u_long  addr = 0;
 
        rsdt = (ACPI_TABLE_RSDT *)rsdp;
        xsdt = (ACPI_TABLE_XSDT *)rsdp;
@@ -1969,7 +1969,7 @@
                        addr = le64toh(xsdt->TableOffsetEntry[i]);
                        break;
                default:
-                       assert((addr == 0));
+                       assert(addr == 0);
                }
                printf("0x%08lx", addr);
        }
@@ -2219,7 +2219,7 @@
        ACPI_TABLE_HEADER *sdp;
        ACPI_TABLE_RSDT *rsdt;
        ACPI_TABLE_XSDT *xsdt;
-       vm_offset_t addr;
+       vm_offset_t addr = 0;
        int entries, i;
 
        acpi_print_rsdt(rsdp);
@@ -2235,7 +2235,7 @@
                        addr = le64toh(xsdt->TableOffsetEntry[i]);
                        break;
                default:
-                       assert((addr == 0));
+                       assert(addr == 0);
                }
 
                sdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(addr);
@@ -2456,7 +2456,7 @@
        ACPI_TABLE_HEADER *sdt;
        ACPI_TABLE_RSDT *rsdt;
        ACPI_TABLE_XSDT *xsdt;
-       vm_offset_t addr;
+       vm_offset_t addr = 0;
        int entries, i;
 
        rsdt = (ACPI_TABLE_RSDT *)rsdp;
@@ -2471,7 +2471,7 @@
                        addr = le64toh(xsdt->TableOffsetEntry[i]);
                        break;
                default:
-                       assert((addr == 0));
+                       assert(addr == 0);
                }
                sdt = (ACPI_TABLE_HEADER *)acpi_map_sdt(addr);
                if (last != NULL) {



Home | Main Index | Thread Index | Old Index