Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Don't cast argument to ffs() to long.
details: https://anonhg.NetBSD.org/src/rev/29697838b049
branches: trunk
changeset: 523119:29697838b049
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Mar 05 09:40:38 2002 +0000
description:
Don't cast argument to ffs() to long.
Per discussion on port-alpha, noticed by Robert Elz.
diffstat:
sys/arch/algor/algor/disksubr.c | 6 +++---
sys/arch/alpha/alpha/disksubr.c | 6 +++---
sys/arch/amiga/amiga/disksubr.c | 6 +++---
sys/arch/hp300/hp300/disksubr.c | 4 ++--
sys/arch/mac68k/mac68k/disksubr.c | 4 ++--
sys/arch/mipsco/mipsco/disksubr.c | 4 ++--
sys/arch/mvme68k/mvme68k/disksubr.c | 4 ++--
sys/arch/news68k/news68k/disksubr.c | 4 ++--
sys/arch/newsmips/newsmips/disksubr.c | 4 ++--
sys/arch/next68k/next68k/disksubr.c | 4 ++--
sys/arch/pc532/pc532/disksubr.c | 4 ++--
sys/arch/pmax/pmax/disksubr.c | 4 ++--
sys/arch/sgimips/sgimips/disksubr.c | 4 ++--
sys/arch/sparc/sparc/disksubr.c | 4 ++--
sys/arch/sparc64/sparc64/disksubr.c | 4 ++--
sys/arch/vax/if/if_uba.c | 6 +++---
sys/arch/vax/vax/disksubr.c | 4 ++--
17 files changed, 38 insertions(+), 38 deletions(-)
diffs (truncated from 342 to 300 lines):
diff -r d08077e17697 -r 29697838b049 sys/arch/algor/algor/disksubr.c
--- a/sys/arch/algor/algor/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/algor/algor/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.5 2002/02/19 17:09:41 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.6 2002/03/05 09:40:38 simonb Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.5 2002/02/19 17:09:41 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.6 2002/03/05 09:40:38 simonb Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -168,7 +168,7 @@
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/alpha/alpha/disksubr.c
--- a/sys/arch/alpha/alpha/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/alpha/alpha/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.24 2002/02/19 17:09:42 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.25 2002/03/05 09:40:39 simonb Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.24 2002/02/19 17:09:42 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.25 2002/03/05 09:40:39 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -175,7 +175,7 @@
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/amiga/amiga/disksubr.c
--- a/sys/arch/amiga/amiga/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/amiga/amiga/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.40 2002/02/19 17:09:42 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.41 2002/03/05 09:40:39 simonb Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.40 2002/02/19 17:09:42 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.41 2002/03/05 09:40:39 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -455,7 +455,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/hp300/hp300/disksubr.c
--- a/sys/arch/hp300/hp300/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/hp300/hp300/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:43 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.13 2002/03/05 09:40:39 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1993
@@ -117,7 +117,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/mac68k/mac68k/disksubr.c
--- a/sys/arch/mac68k/mac68k/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/mac68k/mac68k/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.40 2002/02/19 17:09:45 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.41 2002/03/05 09:40:40 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -514,7 +514,7 @@
* e.g. Macintosh or (PC) BIOS, will be overwritten.
*/
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/mipsco/mipsco/disksubr.c
--- a/sys/arch/mipsco/mipsco/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/mipsco/mipsco/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.9 2002/02/19 17:09:45 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.10 2002/03/05 09:40:40 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -158,7 +158,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/mvme68k/mvme68k/disksubr.c
--- a/sys/arch/mvme68k/mvme68k/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/mvme68k/mvme68k/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.22 2002/02/19 17:09:46 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.23 2002/03/05 09:40:40 simonb Exp $ */
/*
* Copyright (c) 1995 Dale Rahn.
@@ -147,7 +147,7 @@
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/news68k/news68k/disksubr.c
--- a/sys/arch/news68k/news68k/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/news68k/news68k/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.8 2002/02/19 17:09:46 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.9 2002/03/05 09:40:40 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -112,7 +112,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/newsmips/newsmips/disksubr.c
--- a/sys/arch/newsmips/newsmips/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/newsmips/newsmips/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.9 2002/02/19 17:09:46 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.10 2002/03/05 09:40:41 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -112,7 +112,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/next68k/next68k/disksubr.c
--- a/sys/arch/next68k/next68k/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/next68k/next68k/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.6 2002/02/19 17:09:46 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.7 2002/03/05 09:40:41 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1993
@@ -119,7 +119,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/pc532/pc532/disksubr.c
--- a/sys/arch/pc532/pc532/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/pc532/pc532/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.21 2002/02/19 17:09:47 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.22 2002/03/05 09:40:41 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -120,7 +120,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/pmax/pmax/disksubr.c
--- a/sys/arch/pmax/pmax/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/pmax/pmax/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.35 2002/02/19 17:09:47 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.36 2002/03/05 09:40:41 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -218,7 +218,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/sgimips/sgimips/disksubr.c
--- a/sys/arch/sgimips/sgimips/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/sgimips/sgimips/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.6 2002/02/19 17:09:48 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.7 2002/03/05 09:40:41 simonb Exp $ */
/*
* Copyright (c) 2001 Christopher Sekiya
@@ -132,7 +132,7 @@
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/sparc/sparc/disksubr.c
--- a/sys/arch/sparc/sparc/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/sparc/sparc/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.32 2002/02/19 17:09:49 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.33 2002/03/05 09:40:42 simonb Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -162,7 +162,7 @@
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/sparc64/sparc64/disksubr.c
--- a/sys/arch/sparc64/sparc64/disksubr.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/sparc64/sparc64/disksubr.c Tue Mar 05 09:40:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.14 2002/02/19 17:09:49 wiz Exp $ */
+/* $NetBSD: disksubr.c,v 1.15 2002/03/05 09:40:42 simonb Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -161,7 +161,7 @@
dkcksum(nlp) != 0)
return (EINVAL);
- while ((i = ffs((long)openmask)) != 0) {
+ while ((i = ffs(openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
diff -r d08077e17697 -r 29697838b049 sys/arch/vax/if/if_uba.c
--- a/sys/arch/vax/if/if_uba.c Tue Mar 05 08:13:56 2002 +0000
+++ b/sys/arch/vax/if/if_uba.c Tue Mar 05 09:40:38 2002 +0000
Home |
Main Index |
Thread Index |
Old Index