diff options
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/fmt.c | 4 | ||||
-rw-r--r-- | bin/ps/ps.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/bin/ps/fmt.c b/bin/ps/fmt.c index 8e193746535..19407b4cc91 100644 --- a/bin/ps/fmt.c +++ b/bin/ps/fmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt.c,v 1.7 2004/01/08 18:18:35 millert Exp $ */ +/* $OpenBSD: fmt.c,v 1.8 2006/04/25 15:41:07 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -57,7 +57,7 @@ fmt_puts(const char *s, int *leftp) return; len = strlen(s) * 4 + 1; if (len > maxlen) { - int newmaxlen = maxlen; + size_t newmaxlen = maxlen; if (newmaxlen == 0) newmaxlen = getpagesize(); diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 435983d6eb1..ef1cd971d03 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ps.c,v 1.40 2004/11/24 19:17:10 deraadt Exp $ */ +/* $OpenBSD: ps.c,v 1.41 2006/04/25 15:41:07 deraadt Exp $ */ /* $NetBSD: ps.c,v 1.15 1995/05/18 20:33:25 mycroft Exp $ */ /*- @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: ps.c,v 1.40 2004/11/24 19:17:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ps.c,v 1.41 2006/04/25 15:41:07 deraadt Exp $"; #endif #endif /* not lint */ @@ -117,9 +117,9 @@ main(int argc, char *argv[]) char *nlistf, *memf, *swapf, errbuf[_POSIX2_LINE_MAX]; size_t size; - if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 && - ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 && - ioctl(STDIN_FILENO, TIOCGWINSZ, (char *)&ws) == -1) || + if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1 && + ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 && + ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1) || ws.ws_col == 0) termwidth = 79; else |