Module Name:    src
Committed By:   christos
Date:           Sat Sep 26 13:04:10 UTC 2015

Modified Files:
        src/sys/dev/acpi: valz_acpi.c

Log Message:
CID 1324963: Remove bogus NULL test
CID 1324962: This is not python, one needs braces too.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/valz_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/valz_acpi.c
diff -u src/sys/dev/acpi/valz_acpi.c:1.5 src/sys/dev/acpi/valz_acpi.c:1.6
--- src/sys/dev/acpi/valz_acpi.c:1.5	Mon Sep 21 08:32:06 2015
+++ src/sys/dev/acpi/valz_acpi.c	Sat Sep 26 09:04:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: valz_acpi.c,v 1.5 2015/09/21 12:32:06 nonaka Exp $	*/
+/*	$NetBSD: valz_acpi.c,v 1.6 2015/09/26 13:04:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: valz_acpi.c,v 1.5 2015/09/21 12:32:06 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: valz_acpi.c,v 1.6 2015/09/26 13:04:10 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -420,13 +420,13 @@ hci_op(struct valz_acpi_softc *sc, uint3
 	param = (ACPI_OBJECT *)buf.Pointer;
 	PrtElement = param->Package.Elements;
 	for (i = 0; i < HCI_WORDS; i++) {
-		if (PrtElement->Type == ACPI_TYPE_INTEGER)
+		if (PrtElement->Type == ACPI_TYPE_INTEGER) {
 			output[i] = PrtElement->Integer.Value;
 			PrtElement++;
+		}
 	}
 
-	if (buf.Pointer)
-		ACPI_FREE(buf.Pointer);
+	ACPI_FREE(buf.Pointer);
 
 	return rv;
 }

Reply via email to