From b56ac0785a3a27c4ef1b16e105729f65af219f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 29 May 2005 21:44:30 +0000 Subject: [PATCH] avoid 'unused variable' warnings git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15289 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftpd/ftpd.c | 6 +++--- appl/popper/pop_user.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/appl/ftp/ftpd/ftpd.c b/appl/ftp/ftpd/ftpd.c index 9489d0197..8b55f4416 100644 --- a/appl/ftp/ftpd/ftpd.c +++ b/appl/ftp/ftpd/ftpd.c @@ -600,9 +600,9 @@ user(char *name) else reply(530, "User %s access denied.", name); } else { +#ifdef OTP char ss[256]; -#ifdef OTP if (otp_challenge(&otp_ctx, name, ss, sizeof(ss)) == 0) { reply(331, "Password %s for %s required.", ss, name); @@ -613,9 +613,9 @@ user(char *name) reply(331, "Password required for %s.", name); askpasswd = 1; } else { - char *s; - #ifdef OTP + char *s; + if ((s = otp_error (&otp_ctx)) != NULL) lreply(530, "OTP: %s", s); #endif diff --git a/appl/popper/pop_user.c b/appl/popper/pop_user.c index 9a530260d..8c9fed23b 100644 --- a/appl/popper/pop_user.c +++ b/appl/popper/pop_user.c @@ -14,13 +14,12 @@ RCSID("$Id$"); int pop_user (POP *p) { - char ss[256]; - strlcpy(p->user, p->pop_parm[1], sizeof(p->user)); if (p->auth_level == AUTH_OTP) { - char *s = NULL; #ifdef OTP + char ss[256], *s; + if(otp_challenge (&p->otp_ctx, p->user, ss, sizeof(ss)) == 0) return pop_msg(p, POP_SUCCESS, "Password %s required for %s.", ss, p->user);