comparing against buf and not hostname; openbsd tree has this

problem also.
This commit is contained in:
Kevin Steves 2000-10-14 16:10:06 +00:00
parent 8d3ebb418a
commit c368a3c939
1 changed files with 1 additions and 1 deletions

View File

@ -749,7 +749,7 @@ do_login(Session *s)
time_string = ctime(&last_login_time);
if (strchr(time_string, '\n'))
*strchr(time_string, '\n') = 0;
if (strcmp(buf, "") == 0)
if (strcmp(hostname, "") == 0)
printf("Last login: %s\r\n", time_string);
else
printf("Last login: %s from %s\r\n", time_string, hostname);