summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-02-22 21:36:47 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-02-22 21:36:47 +0000
commit46864b7a70f890543f59f2ffec2f0fcec3a00111 (patch)
tree47828982084633746797f6f6fec166cfd4732365 /usr.sbin/pkg_add/OpenBSD
parenta3d1b83eff15f96dc8a6514389533c06432d8876 (diff)
avoid comparing undef to 0: perl's ioctl returns `true' 0s, so that this
idiom works.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm b/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
index cbab757a947..8f82a1f865e 100644
--- a/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
+++ b/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: ProgressMeter.pm,v 1.8 2006/02/10 09:52:28 bernd Exp $
+# $OpenBSD: ProgressMeter.pm,v 1.9 2007/02/22 21:36:46 espie Exp $
#
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
@@ -42,7 +42,7 @@ sub find_window_size
$sizeof{'struct winsize'} = 8;
require 'sys/ttycom.ph';
$width = 80;
- if (ioctl(STDERR, &TIOCGWINSZ, $r) == 0) {
+ if (ioctl(STDERR, &TIOCGWINSZ, $r)) {
my ($rows, $cols, $xpix, $ypix) =
unpack($wsz_format, $r);
$width = $cols;