lint, use UNASSIGNED, not -1
authorBill Joy <root@ucbvax.Berkeley.EDU>
Thu, 10 Oct 1991 03:24:15 +0000 (19:24 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Thu, 10 Oct 1991 03:24:15 +0000 (19:24 -0800)
SCCS-vsn: sys/ufs/lfs/lfs_balloc.c 7.17

usr/src/sys/ufs/lfs/lfs_balloc.c

index 8daeacf..e0df924 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)lfs_balloc.c        7.16 (Berkeley) %G%
+ *     @(#)lfs_balloc.c        7.17 (Berkeley) %G%
  */
 
 #ifdef LOGFS
  */
 
 #ifdef LOGFS
@@ -33,6 +33,7 @@
  * is done by using the logical block number to index into
  * the array of block pointers described by the dinode.
  */
  * is done by using the logical block number to index into
  * the array of block pointers described by the dinode.
  */
+int
 lfs_bmap(ip, bn, bnp)
        register struct inode *ip;
        register daddr_t bn;
 lfs_bmap(ip, bn, bnp)
        register struct inode *ip;
        register daddr_t bn;
@@ -44,7 +45,7 @@ lfs_bmap(ip, bn, bnp)
        struct buf *bp;
        daddr_t *bap, daddr;
        daddr_t lbn_ind;
        struct buf *bp;
        daddr_t *bap, daddr;
        daddr_t lbn_ind;
-       int i, j, off, sh;
+       int j, off, sh;
        int error;
 
 printf("lfs_bmap: block number %d, inode %d\n", bn, ip->i_number);
        int error;
 
 printf("lfs_bmap: block number %d, inode %d\n", bn, ip->i_number);
@@ -71,7 +72,7 @@ printf("lfs_bmap: block number %d, inode %d\n", bn, ip->i_number);
        if (bn < NDADDR) {
                nb = ip->i_db[bn];
                if (nb == 0) {
        if (bn < NDADDR) {
                nb = ip->i_db[bn];
                if (nb == 0) {
-                       *bnp = (daddr_t)-1;
+                       *bnp = UNASSIGNED;
                        return (0);
                }
                *bnp = nb;
                        return (0);
                }
                *bnp = nb;
@@ -100,7 +101,7 @@ printf("lfs_bmap: block number %d, inode %d\n", bn, ip->i_number);
        devvp = VFSTOUFS(vp->v_mount)->um_devvp;
        for (off = NIADDR - j, bap = ip->i_ib; j <= NIADDR; j++) {
                if((daddr = bap[off]) == 0) {
        devvp = VFSTOUFS(vp->v_mount)->um_devvp;
        for (off = NIADDR - j, bap = ip->i_ib; j <= NIADDR; j++) {
                if((daddr = bap[off]) == 0) {
-                       daddr = (daddr_t)-1;
+                       daddr = UNASSIGNED;
                        break;
                }
                if (bp)
                        break;
                }
                if (bp)