Module Name:    src
Committed By:   lukem
Date:           Mon Apr  6 12:38:35 UTC 2009

Modified Files:
        src/sbin/swapctl: swaplist.c

Log Message:
redo previous to fix amd64 build


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sbin/swapctl/swaplist.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/swapctl/swaplist.c
diff -u src/sbin/swapctl/swaplist.c:1.16 src/sbin/swapctl/swaplist.c:1.17
--- src/sbin/swapctl/swaplist.c:1.16	Mon Apr  6 12:27:01 2009
+++ src/sbin/swapctl/swaplist.c	Mon Apr  6 12:38:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: swaplist.c,v 1.16 2009/04/06 12:27:01 lukem Exp $	*/
+/*	$NetBSD: swaplist.c,v 1.17 2009/04/06 12:38:35 lukem Exp $	*/
 
 /*
  * Copyright (c) 1997 Matthew R. Green
@@ -28,7 +28,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: swaplist.c,v 1.16 2009/04/06 12:27:01 lukem Exp $");
+__RCSID("$NetBSD: swaplist.c,v 1.17 2009/04/06 12:38:35 lukem Exp $");
 #endif
 
 
@@ -60,8 +60,8 @@
 	long	blocksize;
 	char	szbuf[5], usbuf[5], avbuf[5]; /* size, used, avail */
 	const	char *header, *suff;
-	size_t	l, pathmax;
-	int	hlen, totalsize, size, totalinuse, inuse, ncounted;
+	size_t	l;
+	int	hlen, totalsize, size, totalinuse, inuse, ncounted, pathmax;
 	int	rnswap, nswap = swapctl(SWAP_NSWAP, 0, 0), i;
 
 	if (nswap < 1) {
@@ -111,7 +111,7 @@
 
 	if (dolong && tflag == 0) {
 		for (i = rnswap; i-- > 0; sep++)
-			if (pathmax < (l = strlen(sep->se_path)))
+			if ((size_t)pathmax < (l = strlen(sep->se_path)))
 				pathmax = l;
 		sep = fsep;
 		(void)printf("%-*s %*s %8s %8s %8s  %s\n",

Reply via email to