summaryrefslogtreecommitdiff
path: root/bin/ksh/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/lex.c')
-rw-r--r--bin/ksh/lex.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c
index 5beefbe6e55..2441dc14842 100644
--- a/bin/ksh/lex.c
+++ b/bin/ksh/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.34 2005/01/10 17:52:04 millert Exp $ */
+/* $OpenBSD: lex.c,v 1.35 2005/02/21 16:01:58 otto Exp $ */
/*
* lexical analysis and source input
@@ -1278,11 +1278,7 @@ dopprompt(const char *sp, int ntruncate, const char **spp, int doprint)
strftime(strbuf, sizeof strbuf, "%R", tm);
break;
case 'u': /* '\' 'u' username */
- p = getlogin();
- if (p)
- strlcpy(strbuf, p, sizeof strbuf);
- else
- strbuf[0] = '\0';
+ strlcpy(strbuf, username, sizeof strbuf);
break;
case 'v': /* '\' 'v' version (short) */
p = strchr(ksh_version, ' ');