summaryrefslogtreecommitdiff
path: root/usr.bin/telnet/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/telnet/commands.c')
-rw-r--r--usr.bin/telnet/commands.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c
index d11f8de5c66..2b67ac56b6c 100644
--- a/usr.bin/telnet/commands.c
+++ b/usr.bin/telnet/commands.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commands.c,v 1.28 2000/04/30 23:57:08 millert Exp $ */
+/* $OpenBSD: commands.c,v 1.29 2000/08/02 04:10:49 millert Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
@@ -2202,6 +2202,8 @@ cmdrc(char *m1, char *m2)
if (rcname[0] == 0) {
char *home = getenv("HOME");
+ if (home == NULL || *home == '\0')
+ return;
snprintf (rcname, sizeof(rcname), "%s/.telnetrc",
home ? home : "");
}