Date: Sun, 24 Apr 2016 20:31:22 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298551 - head/sbin/fsck_ffs Message-ID: <201604242031.u3OKVMFC048969@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sun Apr 24 20:31:22 2016 New Revision: 298551 URL: https://svnweb.freebsd.org/changeset/base/298551 Log: 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 Modified: head/sbin/fsck_ffs/suj.c Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Sun Apr 24 19:25:11 2016 (r298550) +++ head/sbin/fsck_ffs/suj.c Sun Apr 24 20:31:22 2016 (r298551) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604242031.u3OKVMFC048969>