diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-24 20:31:22 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-24 20:31:22 +0000 |
commit | ed7de6d63519f7b5ccbf8b1ca7af60fab9830ef6 (patch) | |
tree | bacdfdec0298bec3b26086759a3633220db51adc | |
parent | ec646174295950bf0120b9c60ecb0b0382cd0ab6 (diff) | |
download | FreeBSD-src-ed7de6d63519f7b5ccbf8b1ca7af60fab9830ef6.zip FreeBSD-src-ed7de6d63519f7b5ccbf8b1ca7af60fab9830ef6.tar.gz |
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
-rw-r--r-- | sbin/fsck_ffs/suj.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index 9d6a2ec..6741fbf 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -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 |