From a910746d015dc74aa702eaffe13e98a496e0a1cc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 19 Feb 2001 20:49:47 +0000 Subject: Abstract out the needs-password check. svn path=/trunk/; revision=3122 --- fetchmail.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index ac6d99e0..6e1d6756 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -324,7 +324,7 @@ int main(int argc, char **argv) { if (ctl->active && !(implicitmode && ctl->server.skip)&&!ctl->password) { - if (ctl->server.authenticate > A_PASSWORD || ctl->server.protocol >= P_ETRN) + if (NO_PASSWORD(ctl)) /* Server won't care what the password is, but there must be some non-null string here. */ ctl->password = ctl->remotename; @@ -494,9 +494,7 @@ int main(int argc, char **argv) for (ctl = querylist; ctl; ctl = ctl->next) { if (ctl->active && !(implicitmode && ctl->server.skip) - && ctl->server.authenticate <= A_PASSWORD - && ctl->server.protocol < P_ETRN - && !ctl->password) + && !NO_PASSWORD(ctl) && !ctl->password) { if (!isatty(0)) { -- cgit v1.2.3