diff options
author | 1997-04-28 20:35:59 +0000 | |
---|---|---|
committer | 1997-04-28 20:35:59 +0000 | |
commit | 9277c003556275c8db214018755556a46296ca62 (patch) | |
tree | 18b6f591cca5ef63dab7f4e3dba6c6418aca1165 | |
parent | Use strtoul() not strtol() when assigning to an unsigned long. (diff) | |
download | wireguard-openbsd-9277c003556275c8db214018755556a46296ca62.tar.xz wireguard-openbsd-9277c003556275c8db214018755556a46296ca62.zip |
Deal with $TERM not being set (like in single user mode).
-rw-r--r-- | usr.bin/ftp/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 47ca64ad8e8..d84e660e141 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.30 1997/04/23 20:33:19 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.31 1997/04/28 20:35:59 millert Exp $ */ /* $NetBSD: main.c,v 1.21 1997/04/05 03:27:39 lukem Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.30 1997/04/23 20:33:19 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.31 1997/04/28 20:35:59 millert Exp $"; #endif #endif /* not lint */ @@ -107,8 +107,9 @@ main(argc, argv) if (strcmp(cp, "pftp") == 0) passivemode = 1; - dumb_terminal = (!strcmp(getenv("TERM"), "dumb") || - !strcmp(getenv("TERM"), "emacs") || !strcmp(getenv("TERM"), "su")); + cp = getenv("TERM"); + dumb_terminal = (cp == NULL || !strcmp(cp, "dumb") || + !strcmp(cp, "emacs") || !strcmp(cp, "su")); fromatty = isatty(fileno(stdin)); if (fromatty) { verbose = 1; /* verbose if from a tty */ |