Module Name:    src
Committed By:   christos
Date:           Sat Jan 14 12:12:50 UTC 2023

Modified Files:
        src/sbin/fsck_ffs: fsck.h inode.c pass4.c utilities.c

Log Message:
catch up with sign changes in the fs.h


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sbin/fsck_ffs/fsck.h
cvs rdiff -u -r1.73 -r1.74 src/sbin/fsck_ffs/inode.c
cvs rdiff -u -r1.29 -r1.30 src/sbin/fsck_ffs/pass4.c
cvs rdiff -u -r1.67 -r1.68 src/sbin/fsck_ffs/utilities.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_ffs/fsck.h
diff -u src/sbin/fsck_ffs/fsck.h:1.56 src/sbin/fsck_ffs/fsck.h:1.57
--- src/sbin/fsck_ffs/fsck.h:1.56	Thu Nov 17 01:40:38 2022
+++ src/sbin/fsck_ffs/fsck.h	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsck.h,v 1.56 2022/11/17 06:40:38 chs Exp $	*/
+/*	$NetBSD: fsck.h,v 1.57 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -97,7 +97,7 @@ struct inostat {
  * which are described by the following structure.
  */
 extern struct inostatlist {
-	long    il_numalloced;  /* number of inodes allocated in this cg */
+	size_t  il_numalloced;  /* number of inodes allocated in this cg */
 	struct inostat *il_stat;/* inostat info for this cylinder group */
 } *inostathead;
 

Index: src/sbin/fsck_ffs/inode.c
diff -u src/sbin/fsck_ffs/inode.c:1.73 src/sbin/fsck_ffs/inode.c:1.74
--- src/sbin/fsck_ffs/inode.c:1.73	Fri Apr 17 05:42:27 2020
+++ src/sbin/fsck_ffs/inode.c	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: inode.c,v 1.73 2020/04/17 09:42:27 jdolecek Exp $	*/
+/*	$NetBSD: inode.c,v 1.74 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)inode.c	8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: inode.c,v 1.73 2020/04/17 09:42:27 jdolecek Exp $");
+__RCSID("$NetBSD: inode.c,v 1.74 2023/01/14 12:12:50 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -731,11 +731,11 @@ allocino(ino_t request, int type)
 		return (0);
 	cg = ino_to_cg(sblock, ino);
 	/* If necessary, extend the inoinfo array. grow exponentially */
-	if ((ino % sblock->fs_ipg) >= (uint64_t)inostathead[cg].il_numalloced) {
-		unsigned long newalloced, i;
+	if ((ino % sblock->fs_ipg) >= inostathead[cg].il_numalloced) {
+		size_t newalloced, i;
 		newalloced = MIN(sblock->fs_ipg,
 			MAX(2 * inostathead[cg].il_numalloced, 10));
-		info = calloc(newalloced, sizeof(struct inostat));
+		info = calloc(newalloced, sizeof(*info));
 		if (info == NULL) {
 			pwarn("cannot alloc %lu bytes to extend inoinfo\n",
 				sizeof(struct inostat) * newalloced);

Index: src/sbin/fsck_ffs/pass4.c
diff -u src/sbin/fsck_ffs/pass4.c:1.29 src/sbin/fsck_ffs/pass4.c:1.30
--- src/sbin/fsck_ffs/pass4.c:1.29	Sat Jan  7 14:41:29 2023
+++ src/sbin/fsck_ffs/pass4.c	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pass4.c,v 1.29 2023/01/07 19:41:29 chs Exp $	*/
+/*	$NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass4.c	8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass4.c,v 1.29 2023/01/07 19:41:29 chs Exp $");
+__RCSID("$NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -62,7 +62,8 @@ pass4(void)
 	struct zlncnt *zlnp;
 	union dinode *dp;
 	struct inodesc idesc;
-	int n, i;
+	int n;
+	size_t i;
 	uint32_t cg;
 	struct inostat *info;
 

Index: src/sbin/fsck_ffs/utilities.c
diff -u src/sbin/fsck_ffs/utilities.c:1.67 src/sbin/fsck_ffs/utilities.c:1.68
--- src/sbin/fsck_ffs/utilities.c:1.67	Thu Nov 17 01:40:38 2022
+++ src/sbin/fsck_ffs/utilities.c	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: utilities.c,v 1.67 2022/11/17 06:40:38 chs Exp $	*/
+/*	$NetBSD: utilities.c,v 1.68 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)utilities.c	8.6 (Berkeley) 5/19/95";
 #else
-__RCSID("$NetBSD: utilities.c,v 1.67 2022/11/17 06:40:38 chs Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.68 2023/01/14 12:12:50 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -590,7 +590,7 @@ inoinfo(ino_t inum)
 {
 	static struct inostat unallocated = { USTATE, 0, 0 };
 	struct inostatlist *ilp;
-	int iloff;
+	size_t iloff;
 
 	if (inum > maxino)
 		errexit("inoinfo: inumber %llu out of range",

Reply via email to