avoid the need for a bogus initializer.
This commit is contained in:
parent
20b89dd47f
commit
6c50e54c82
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: lfs.c,v 1.17 2005/09/13 04:14:17 christos Exp $ */
|
/* $NetBSD: lfs.c,v 1.18 2005/10/08 03:21:17 chs Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -240,8 +240,6 @@ ufs_getlbns(struct lfs * fs, struct uvnode * vp, daddr_t bn, struct indir * ap,
|
||||||
int i, numlevels, off;
|
int i, numlevels, off;
|
||||||
int lognindir, indir;
|
int lognindir, indir;
|
||||||
|
|
||||||
metalbn = 0; /* XXXGCC -Wuninitialized [dreamcast] */
|
|
||||||
|
|
||||||
if (nump)
|
if (nump)
|
||||||
*nump = 0;
|
*nump = 0;
|
||||||
numlevels = 0;
|
numlevels = 0;
|
||||||
|
@ -271,10 +269,7 @@ ufs_getlbns(struct lfs * fs, struct uvnode * vp, daddr_t bn, struct indir * ap,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the address of the first meta-block. */
|
/* Calculate the address of the first meta-block. */
|
||||||
if (realbn >= 0)
|
metalbn = -((realbn >= 0 ? realbn : -realbn) - bn + NIADDR - i);
|
||||||
metalbn = -(realbn - bn + NIADDR - i);
|
|
||||||
else
|
|
||||||
metalbn = -(-realbn - bn + NIADDR - i);
|
|
||||||
|
|
||||||
/* At each iteration, off is the offset into the bap array which is an
|
/* At each iteration, off is the offset into the bap array which is an
|
||||||
* array of disk addresses at the current level of indirection. The
|
* array of disk addresses at the current level of indirection. The
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ufs_bmap.c,v 1.37 2005/08/12 22:31:51 jmmv Exp $ */
|
/* $NetBSD: ufs_bmap.c,v 1.38 2005/10/08 03:21:17 chs Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1989, 1991, 1993
|
* Copyright (c) 1989, 1991, 1993
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.37 2005/08/12 22:31:51 jmmv Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.38 2005/10/08 03:21:17 chs Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -354,11 +354,7 @@ ufs_getlbns(struct vnode *vp, daddr_t bn, struct indir *ap, int *nump)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the address of the first meta-block. */
|
/* Calculate the address of the first meta-block. */
|
||||||
metalbn = 0; /* XXX: gcc3 */
|
metalbn = -((realbn >= 0 ? realbn : -realbn) - bn + NIADDR - i);
|
||||||
if (realbn >= 0)
|
|
||||||
metalbn = -(realbn - bn + NIADDR - i);
|
|
||||||
else
|
|
||||||
metalbn = -(-realbn - bn + NIADDR - i);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At each iteration, off is the offset into the bap array which is
|
* At each iteration, off is the offset into the bap array which is
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ufs_bmap.c,v 1.15 2005/06/07 13:54:55 he Exp $ */
|
/* $NetBSD: ufs_bmap.c,v 1.16 2005/10/08 03:21:17 chs Exp $ */
|
||||||
/* From: NetBSD: ufs_bmap.c,v 1.14 2001/11/08 05:00:51 chs Exp */
|
/* From: NetBSD: ufs_bmap.c,v 1.14 2001/11/08 05:00:51 chs Exp */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#if defined(__RCSID) && !defined(__lint)
|
#if defined(__RCSID) && !defined(__lint)
|
||||||
__RCSID("$NetBSD: ufs_bmap.c,v 1.15 2005/06/07 13:54:55 he Exp $");
|
__RCSID("$NetBSD: ufs_bmap.c,v 1.16 2005/10/08 03:21:17 chs Exp $");
|
||||||
#endif /* !__lint */
|
#endif /* !__lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -80,7 +80,6 @@ ufs_getlbns(struct inode *ip, daddr_t bn, struct indir *ap, int *nump)
|
||||||
int i, numlevels, off;
|
int i, numlevels, off;
|
||||||
u_long lognindir;
|
u_long lognindir;
|
||||||
|
|
||||||
metalbn = 0; /* XXXGCC -Wuninitialized [sparc64] */
|
|
||||||
lognindir = ffs(NINDIR(ip->i_fs)) - 1;
|
lognindir = ffs(NINDIR(ip->i_fs)) - 1;
|
||||||
if (nump)
|
if (nump)
|
||||||
*nump = 0;
|
*nump = 0;
|
||||||
|
@ -111,10 +110,7 @@ ufs_getlbns(struct inode *ip, daddr_t bn, struct indir *ap, int *nump)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the address of the first meta-block. */
|
/* Calculate the address of the first meta-block. */
|
||||||
if (realbn >= 0)
|
metalbn = -((realbn >= 0 ? realbn : -realbn) - bn + NIADDR - i);
|
||||||
metalbn = -(realbn - bn + NIADDR - i);
|
|
||||||
else
|
|
||||||
metalbn = -(-realbn - bn + NIADDR - i);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At each iteration, off is the offset into the bap array which is
|
* At each iteration, off is the offset into the bap array which is
|
||||||
|
|
Loading…
Reference in New Issue