Module Name: src
Committed By: lukem
Date: Sat Apr 11 06:48:36 UTC 2009
Modified Files:
src/sbin/fsck: partutil.c progress.c
Log Message:
fix sign-compare issues
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/fsck/partutil.c
cvs rdiff -u -r1.4 -r1.5 src/sbin/fsck/progress.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/partutil.c
diff -u src/sbin/fsck/partutil.c:1.3 src/sbin/fsck/partutil.c:1.4
--- src/sbin/fsck/partutil.c:1.3 Mon Apr 28 20:23:08 2008
+++ src/sbin/fsck/partutil.c Sat Apr 11 06:48:36 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: partutil.c,v 1.3 2008/04/28 20:23:08 martin Exp $ */
+/* $NetBSD: partutil.c,v 1.4 2009/04/11 06:48:36 lukem Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: partutil.c,v 1.3 2008/04/28 20:23:08 martin Exp $");
+__RCSID("$NetBSD: partutil.c,v 1.4 2009/04/11 06:48:36 lukem Exp $");
#include <sys/types.h>
#include <sys/disklabel.h>
@@ -75,7 +75,8 @@
return;
ptn = strchr(s, '\0')[-1] - 'a';
- if (ptn >= lp->d_npartitions || ptn != DISKPART(sb.st_rdev))
+ if ((unsigned)ptn >= lp->d_npartitions ||
+ (devminor_t)ptn != DISKPART(sb.st_rdev))
return;
pp = &lp->d_partitions[ptn];
Index: src/sbin/fsck/progress.c
diff -u src/sbin/fsck/progress.c:1.4 src/sbin/fsck/progress.c:1.5
--- src/sbin/fsck/progress.c:1.4 Mon Apr 28 20:23:08 2008
+++ src/sbin/fsck/progress.c Sat Apr 11 06:48:36 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: progress.c,v 1.4 2008/04/28 20:23:08 martin Exp $ */
+/* $NetBSD: progress.c,v 1.5 2009/04/11 06:48:36 lukem Exp $ */
/*-
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#ifndef SMALL
#include <sys/cdefs.h>
-__RCSID("$NetBSD: progress.c,v 1.4 2008/04/28 20:23:08 martin Exp $");
+__RCSID("$NetBSD: progress.c,v 1.5 2009/04/11 06:48:36 lukem Exp $");
/*
* File system independent fsck progress bar routines.
@@ -47,7 +47,7 @@
#include "progress.h"
-static int ttywidth = 80;
+static size_t ttywidth = 80;
static int progress_onoff;
static int progress_lowlim;