From acec5dd26cf180054a5543b83a3e28196d218cc9 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 26 Sep 1996 02:38:45 +0000 Subject: Economize on buffer space. svn path=/trunk/; revision=155 --- fetchmail.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fetchmail.c b/fetchmail.c index d6b6ef38..568002bf 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -93,7 +93,7 @@ char **argv; int mboxfd, st, sargc; struct hostrec cmd_opts, def_opts; int parsestatus, implicitmode; - char *servername, *user, *tmpdir, tmpbuf[256], *sargv[64]; + char *servername, *user, *tmpdir, tmpbuf[BUFSIZ], *sargv[64]; FILE *tmpfp; pid_t pid; @@ -228,12 +228,10 @@ char **argv; if (!(implicitmode && hostp->skip) && !hostp->password[0] && !hostp->rpopid[0]) { - char prompt[BUFSIZ]; - - (void) sprintf(prompt, "Enter password for %s@%s: ", + (void) sprintf(tmpbuf, "Enter password for %s@%s: ", hostp->remotename, hostp->servername); (void) strncpy(hostp->password, - (char *)getpassword(prompt),PASSWORDLEN-1); + (char *)getpassword(tmpbuf),PASSWORDLEN-1); } /* -- cgit v1.2.3