Module Name: src
Committed By: thorpej
Date: Wed Jan 27 03:17:24 UTC 2021
Modified Files:
src/sys/arch/powerpc/powerpc: ofw_machdep.c
Log Message:
There is not much point in of_compatible() returning -1 for "no match"
and >= 0 for "match". Just make it return 0 for "no match" and >0 for
"match" so it can be treated like a boolean expression.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/powerpc/ofw_machdep.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/arch/powerpc/powerpc/ofw_machdep.c
diff -u src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.25 src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.26
--- src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.25 Fri Feb 28 05:44:39 2014
+++ src/sys/arch/powerpc/powerpc/ofw_machdep.c Wed Jan 27 03:17:24 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_machdep.c,v 1.25 2014/02/28 05:44:39 matt Exp $ */
+/* $NetBSD: ofw_machdep.c,v 1.26 2021/01/27 03:17:24 thorpej Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.25 2014/02/28 05:44:39 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.26 2021/01/27 03:17:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -151,7 +151,7 @@ mem_regions(struct mem_region **memp, st
* according to comments in FreeBSD all Apple OF has 32bit values in
* "available", no matter what the cell sizes are
*/
- if (of_compatible(hroot, macrisc) != -1) {
+ if (of_compatible(hroot, macrisc)) {
DPRINTF("this appears to be a mac...\n");
acells = 1;
scells = 1;