Module Name: src
Committed By: lukem
Date: Sun Apr 12 02:51:36 UTC 2009
Modified Files:
src/usr.bin/expand: expand.c
Log Message:
fix -Wsign-compare issue
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/expand/expand.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/expand/expand.c
diff -u src/usr.bin/expand/expand.c:1.12 src/usr.bin/expand/expand.c:1.13
--- src/usr.bin/expand/expand.c:1.12 Mon Jul 21 14:19:22 2008
+++ src/usr.bin/expand/expand.c Sun Apr 12 02:51:36 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: expand.c,v 1.12 2008/07/21 14:19:22 lukem Exp $ */
+/* $NetBSD: expand.c,v 1.13 2009/04/12 02:51:36 lukem Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93";
#endif
-__RCSID("$NetBSD: expand.c,v 1.12 2008/07/21 14:19:22 lukem Exp $");
+__RCSID("$NetBSD: expand.c,v 1.13 2009/04/12 02:51:36 lukem Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -160,7 +160,7 @@
i = i * 10 + *cp++ - '0';
if (i <= 0 || i > 256)
errx(EXIT_FAILURE, "Too large tab stop spec `%d'", i);
- if (nstops > 0 && i <= tabstops[nstops-1])
+ if (nstops > 0 && (size_t)i <= tabstops[nstops-1])
errx(EXIT_FAILURE, "Out of order tabstop spec `%d'", i);
if (nstops == sizeof(tabstops) / sizeof(tabstops[0]) - 1)
errx(EXIT_FAILURE, "Too many tabstops");