Module Name: src
Committed By: lukem
Date: Sun Apr 12 11:19:18 UTC 2009
Modified Files:
src/usr.bin/jot: jot.c
Log Message:
fix sign-compare issue
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/jot/jot.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/jot/jot.c
diff -u src/usr.bin/jot/jot.c:1.24 src/usr.bin/jot/jot.c:1.25
--- src/usr.bin/jot/jot.c:1.24 Mon Jul 21 14:19:23 2008
+++ src/usr.bin/jot/jot.c Sun Apr 12 11:19:18 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: jot.c,v 1.24 2008/07/21 14:19:23 lukem Exp $ */
+/* $NetBSD: jot.c,v 1.25 2009/04/12 11:19:18 lukem Exp $ */
/*-
* Copyright (c) 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)jot.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: jot.c,v 1.24 2008/07/21 14:19:23 lukem Exp $");
+__RCSID("$NetBSD: jot.c,v 1.25 2009/04/12 11:19:18 lukem Exp $");
#endif /* not lint */
/*
@@ -347,7 +347,7 @@
sz = sizeof(format) - strlen(format) - 1;
if (!*p) {
if (chardata || prec == 0) {
- if (snprintf(p, sz, "%%%s", chardata ? "c" : "ld") >= sz)
+ if ((size_t)snprintf(p, sz, "%%%s", chardata ? "c" : "ld") >= sz)
errx(EXIT_FAILURE, "-w word too long");
dox = 1;
} else {