fsck_ffs: Adopt some type safety for the journalling checks.

fs_ncg is of type uint32, and we were indexing it with an int.
Fixed this using an unsigned type and adopt some other unsigned
indexes to remind us when we are dealing with unsigned numbers.

Reviewed by:	mckusick
MFC after:	5 days
This commit is contained in:
Pedro F. Giffuni 2016-04-24 20:31:22 +00:00
parent 72e733c5b1
commit 0f8c0b0ae4

View File

@ -217,7 +217,7 @@ static void
closedisk(const char *devnam)
{
struct csum *cgsum;
int i;
u_int i;
/*
* Recompute the fs summary info from correct cs summaries.
@ -2252,7 +2252,7 @@ suj_build(void)
struct suj_seg *seg;
union jrec *rec;
int off;
int i;
u_int i;
TAILQ_FOREACH(seg, &allsegs, ss_next) {
if (debug)
@ -2540,10 +2540,10 @@ suj_read(void)
struct jsegrec *rec;
ufs2_daddr_t blk;
int readsize;
int blocks;
u_int blocks;
int recsize;
int size;
int i;
u_int i;
/*
* Read records until we exhaust the journal space. If we find