diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-05-05 20:07:38 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-05-05 20:07:38 +0000 |
commit | c3b2241393ec4dbe5e5a691a693379d0807fd26c (patch) | |
tree | b7db381b6120e19f246ba8519e550a228e4daba9 /usr.bin/tip | |
parent | 1cbc1c20695ed77bfe44dac8053048d861d30bec (diff) |
dont write too much data when disconnecting in biz22, also use sizeof
in biz31 for consistency.
millert@ ok
Diffstat (limited to 'usr.bin/tip')
-rw-r--r-- | usr.bin/tip/aculib/biz22.c | 6 | ||||
-rw-r--r-- | usr.bin/tip/aculib/biz31.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/tip/aculib/biz22.c b/usr.bin/tip/aculib/biz22.c index 1c8020c72a1..162c69ae0d5 100644 --- a/usr.bin/tip/aculib/biz22.c +++ b/usr.bin/tip/aculib/biz22.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biz22.c,v 1.9 2003/04/04 21:50:00 deraadt Exp $ */ +/* $OpenBSD: biz22.c,v 1.10 2003/05/05 20:07:37 avsm Exp $ */ /* $NetBSD: biz22.c,v 1.6 1997/02/11 09:24:11 mrg Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)biz22.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: biz22.c,v 1.9 2003/04/04 21:50:00 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: biz22.c,v 1.10 2003/05/05 20:07:37 avsm Exp $"; #endif /* not lint */ #include "tip.h" @@ -127,7 +127,7 @@ biz22f_dialer(num, acu) void biz22_disconnect() { - write(FD, DISCONNECT_CMD, 4); + write(FD, DISCONNECT_CMD, sizeof(DISCONNECT_CMD)-1); sleep(2); tcflush(FD, TCIOFLUSH); } diff --git a/usr.bin/tip/aculib/biz31.c b/usr.bin/tip/aculib/biz31.c index f0e3874cae3..57aeb2ce773 100644 --- a/usr.bin/tip/aculib/biz31.c +++ b/usr.bin/tip/aculib/biz31.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biz31.c,v 1.7 2003/04/04 21:50:00 deraadt Exp $ */ +/* $OpenBSD: biz31.c,v 1.8 2003/05/05 20:07:37 avsm Exp $ */ /* $NetBSD: biz31.c,v 1.5 1997/02/11 09:24:14 mrg Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)biz31.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: biz31.c,v 1.7 2003/04/04 21:50:00 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: biz31.c,v 1.8 2003/05/05 20:07:37 avsm Exp $"; #endif /* not lint */ #include "tip.h" @@ -122,7 +122,7 @@ biz31f_dialer(num, acu) biz31_disconnect() { - write(FD, DISCONNECT_CMD, 4); + write(FD, DISCONNECT_CMD, sizeof(DISCONNECT_CMD)-1); sleep(2); tcflush(FD, TCIOFLUSH); } |