diff options
author | brian <brian@FreeBSD.org> | 2004-09-05 01:46:52 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2004-09-05 01:46:52 +0000 |
commit | 6f864d0a973a7f3987d73132be311b7cfbd1ccfc (patch) | |
tree | fb5af1860e245ef67196527d9ba46e5c9e284bf6 /usr.sbin/ppp/auth.c | |
parent | 2f8e87b45e5735ee9774fce8bc8ffaf1fdc72657 (diff) | |
download | FreeBSD-src-6f864d0a973a7f3987d73132be311b7cfbd1ccfc.zip FreeBSD-src-6f864d0a973a7f3987d73132be311b7cfbd1ccfc.tar.gz |
Make ppp WARNS=5 clean
Diffstat (limited to 'usr.sbin/ppp/auth.c')
-rw-r--r-- | usr.sbin/ppp/auth.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c index 54f0c1c..4617183 100644 --- a/usr.sbin/ppp/auth.c +++ b/usr.sbin/ppp/auth.c @@ -285,8 +285,7 @@ again: } int -auth_Validate(struct bundle *bundle, const char *name, - const char *key, struct physical *physical) +auth_Validate(struct bundle *bundle, const char *name, const char *key) { /* Used by PAP routines */ @@ -337,8 +336,7 @@ again: } char * -auth_GetSecret(struct bundle *bundle, const char *name, int len, - struct physical *physical) +auth_GetSecret(const char *name, size_t len) { /* Used by CHAP routines */ @@ -437,7 +435,7 @@ auth_StopTimer(struct authinfo *authp) struct mbuf * auth_ReadHeader(struct authinfo *authp, struct mbuf *bp) { - int len; + size_t len; len = m_length(bp); if (len >= sizeof authp->in.hdr) { @@ -445,11 +443,11 @@ auth_ReadHeader(struct authinfo *authp, struct mbuf *bp) if (len >= ntohs(authp->in.hdr.length)) return bp; authp->in.hdr.length = htons(0); - log_Printf(LogWARN, "auth_ReadHeader: Short packet (%d > %d) !\n", + log_Printf(LogWARN, "auth_ReadHeader: Short packet (%u > %u) !\n", ntohs(authp->in.hdr.length), len); } else { authp->in.hdr.length = htons(0); - log_Printf(LogWARN, "auth_ReadHeader: Short packet header (%d > %d) !\n", + log_Printf(LogWARN, "auth_ReadHeader: Short packet header (%u > %u) !\n", (int)(sizeof authp->in.hdr), len); } @@ -458,15 +456,15 @@ auth_ReadHeader(struct authinfo *authp, struct mbuf *bp) } struct mbuf * -auth_ReadName(struct authinfo *authp, struct mbuf *bp, int len) +auth_ReadName(struct authinfo *authp, struct mbuf *bp, size_t len) { if (len > sizeof authp->in.name - 1) - log_Printf(LogWARN, "auth_ReadName: Name too long (%d) !\n", len); + log_Printf(LogWARN, "auth_ReadName: Name too long (%u) !\n", len); else { - int mlen = m_length(bp); + size_t mlen = m_length(bp); if (len > mlen) - log_Printf(LogWARN, "auth_ReadName: Short packet (%d > %d) !\n", + log_Printf(LogWARN, "auth_ReadName: Short packet (%u > %u) !\n", len, mlen); else { bp = mbuf_Read(bp, (u_char *)authp->in.name, len); |