diff options
author | 1998-09-22 04:42:49 +0000 | |
---|---|---|
committer | 1998-09-22 04:42:49 +0000 | |
commit | 0e47410eb34dd180510baa38bacdeba8ef94a386 (patch) | |
tree | 928e5b56c1287a2fa5c94690a06e509c1a23bc3d | |
parent | NetBSD changes and further fixes (reformatted man page, better handling of (diff) | |
download | wireguard-openbsd-0e47410eb34dd180510baa38bacdeba8ef94a386.tar.xz wireguard-openbsd-0e47410eb34dd180510baa38bacdeba8ef94a386.zip |
if winsize.ws_col is 0, assume 80
-rw-r--r-- | usr.bin/ftp/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index 3f80cecfca8..a0a7cf15da7 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.20 1998/09/19 22:38:56 millert Exp $ */ +/* $OpenBSD: util.c,v 1.21 1998/09/22 04:42:49 deraadt Exp $ */ /* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */ /* @@ -35,7 +35,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: util.c,v 1.20 1998/09/19 22:38:56 millert Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.21 1998/09/22 04:42:49 deraadt Exp $"; #endif /* not lint */ /* @@ -823,7 +823,7 @@ setttywidth(a) struct winsize winsize; if (ioctl(fileno(ttyout), TIOCGWINSZ, &winsize) != -1) - ttywidth = winsize.ws_col; + ttywidth = winsize.ws_col ? winsize.ws_col : 80; else ttywidth = 80; errno = save_errno; |