From 470f59fa3f11b7317fc5907cfef6043f2104bcc6 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 7 Apr 2011 15:30:17 +0000 Subject: Do not use NULL in integer comparisons. No functional change. ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@ --- sys/arch/mvme88k/dev/vme.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/arch/mvme88k/dev/vme.c') diff --git a/sys/arch/mvme88k/dev/vme.c b/sys/arch/mvme88k/dev/vme.c index 90841c91719..466d5ba4038 100644 --- a/sys/arch/mvme88k/dev/vme.c +++ b/sys/arch/mvme88k/dev/vme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vme.c,v 1.49 2009/02/17 21:03:21 miod Exp $ */ +/* $OpenBSD: vme.c,v 1.50 2011/04/07 15:30:15 miod Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * Copyright (c) 1999 Steve Murphree, Jr. @@ -366,7 +366,7 @@ vmepmap(sc, vmeaddr, bustype) break; #endif default: - return NULL; + return 0; } return (base); } @@ -381,8 +381,8 @@ vmemap(struct vmesoftc *sc, off_t vmeaddr) paddr_t pa; pa = vmepmap((struct device *)sc, vmeaddr, BUS_VMES); - if (pa == NULL) - return (NULL); + if (pa == 0) + return (0); return mapiodev(pa, PAGE_SIZE); } @@ -422,7 +422,7 @@ vmerw(sc, uio, flags, bus) if (c == 0) return 0; vme = vmemap((struct vmesoftc *)sc, v & ~PGOFSET); - if (vme == NULL) + if (vme == 0) return EACCES; error = uiomove((void *)vme + (v & PGOFSET), c, uio); vmeunmap(vme); @@ -626,15 +626,15 @@ vme2chip_map(base, dwidth) case 16: if (base < VME2_D16STARTPHYS || base + PAGE_SIZE > VME2_D16ENDPHYS) - return NULL; + return 0; break; case 32: if (base < VME2_D32STARTPHYS || base + PAGE_SIZE > VME2_D32ENDPHYS) - return NULL; + return 0; break; default: - return NULL; + return 0; } return base; } -- cgit v1.2.3