From 7df7c5efec6f48231cf90a2fbd20997584010fa0 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 9 Mar 2000 15:03:29 +0000 Subject: [PATCH] -Wall cleanup --- libexec/rlogind/rlogind.c | 47 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c index 17832e69cc0..74fe93dbf2c 100644 --- a/libexec/rlogind/rlogind.c +++ b/libexec/rlogind/rlogind.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; */ -static char *rcsid = "$Id: rlogind.c,v 1.23 2000/01/27 05:21:13 itojun Exp $"; +static char *rcsid = "$Id: rlogind.c,v 1.24 2000/03/09 15:03:29 deraadt Exp $"; #endif /* not lint */ /* @@ -282,7 +282,7 @@ doit(f, fromp) #ifdef KERBEROS if (use_kerberos) { - retval = do_krb_login(fromp); + retval = do_krb_login((struct sockaddr_in *)fromp); if (retval == 0) authenticated++; else if (retval > 0) @@ -299,30 +299,29 @@ doit(f, fromp) fatal(f, "Permission denied", 0); } #ifdef IP_OPTIONS - if (fromp->sa_family == AF_INET) - { - struct ipoption opts; - int optsize = sizeof(opts), ipproto, i; - struct protoent *ip; - - if ((ip = getprotobyname("ip")) != NULL) - ipproto = ip->p_proto; - else - ipproto = IPPROTO_IP; - if (getsockopt(0, ipproto, IP_OPTIONS, (char *)&opts, - &optsize) == 0 && optsize != 0) { - for (i = 0; (void *)&opts.ipopt_list[i] - (void *)&opts < - optsize; ) { - u_char c = (u_char)opts.ipopt_list[i]; - if (c == IPOPT_LSRR || c == IPOPT_SSRR) - exit(1); - if (c == IPOPT_EOL) - break; - i += (c == IPOPT_NOP) ? 1 : - (u_char)opts.ipopt_list[i+1]; + if (fromp->sa_family == AF_INET) { + struct ipoption opts; + int optsize = sizeof(opts), ipproto, i; + struct protoent *ip; + + if ((ip = getprotobyname("ip")) != NULL) + ipproto = ip->p_proto; + else + ipproto = IPPROTO_IP; + if (getsockopt(0, ipproto, IP_OPTIONS, (char *)&opts, + &optsize) == 0 && optsize != 0) { + for (i = 0; (void *)&opts.ipopt_list[i] - + (void *)&opts < optsize; ) { + u_char c = (u_char)opts.ipopt_list[i]; + if (c == IPOPT_LSRR || c == IPOPT_SSRR) + exit(1); + if (c == IPOPT_EOL) + break; + i += (c == IPOPT_NOP) ? 1 : + (u_char)opts.ipopt_list[i+1]; + } } } - } #endif if (do_rlogin(fromp) == 0) authenticated++; -- 2.20.1