diff options
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 14 | ||||
-rw-r--r-- | sys/net/if_sppp.h | 8 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 3f45fcf6ea3..e8a499c0882 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.210 2008/12/15 15:50:30 fgsch Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.211 2009/02/06 22:07:04 grange Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -3922,7 +3922,7 @@ spppinfo(struct spppreq *spr) bzero(spr, sizeof(struct spppreq)); ifr.ifr_data = (caddr_t)spr; - spr->cmd = (int)SPPPIOGDEFS; + spr->cmd = SPPPIOGDEFS; if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1) err(1, "SIOCGIFGENERIC(SPPPIOGDEFS)"); } @@ -3944,7 +3944,7 @@ setspppproto(const char *val, int d) else errx(1, "setpppproto"); - spr.cmd = (int)SPPPIOSDEFS; + spr.cmd = SPPPIOSDEFS; if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1) err(1, "SIOCSIFGENERIC(SPPPIOSDEFS)"); } @@ -3968,7 +3968,7 @@ setspppname(const char *val, int d) if (strlcpy((char *)auth->name, val, AUTHNAMELEN) >= AUTHNAMELEN) errx(1, "setspppname"); - spr.cmd = (int)SPPPIOSDEFS; + spr.cmd = SPPPIOSDEFS; if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1) err(1, "SIOCSIFGENERIC(SPPPIOSDEFS)"); } @@ -3992,7 +3992,7 @@ setspppkey(const char *val, int d) if (strlcpy((char *)auth->secret, val, AUTHKEYLEN) >= AUTHKEYLEN) errx(1, "setspppkey"); - spr.cmd = (int)SPPPIOSDEFS; + spr.cmd = SPPPIOSDEFS; if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1) err(1, "SIOCSIFGENERIC(SPPPIOSDEFS)"); } @@ -4026,7 +4026,7 @@ setsppppeerflag(const char *val, int d) else auth->flags |= flag; - spr.cmd = (int)SPPPIOSDEFS; + spr.cmd = SPPPIOSDEFS; if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1) err(1, "SIOCSIFGENERIC(SPPPIOSDEFS)"); } @@ -4066,7 +4066,7 @@ sppp_status(void) bzero(&spr, sizeof(spr)); ifr.ifr_data = (caddr_t)&spr; - spr.cmd = (int)SPPPIOGDEFS; + spr.cmd = SPPPIOGDEFS; if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1) return; if (spr.defs.pp_phase == PHASE_DEAD) diff --git a/sys/net/if_sppp.h b/sys/net/if_sppp.h index 50128c8ac39..31a65dd869c 100644 --- a/sys/net/if_sppp.h +++ b/sys/net/if_sppp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sppp.h,v 1.13 2007/12/04 19:49:52 claudio Exp $ */ +/* $OpenBSD: if_sppp.h,v 1.14 2009/02/06 22:07:04 grange Exp $ */ /* $NetBSD: if_sppp.h,v 1.2.2.1 1999/04/04 06:57:39 explorer Exp $ */ /* @@ -180,13 +180,13 @@ struct sppp { * In order to use this, create a struct spppreq, fill in the cmd * field with SPPPIOGDEFS, and put the address of this structure into * the ifr_data portion of a struct ifreq. Pass this struct to a - * SIOCGIFGENERIC ioctl. Then replace the cmd field by SPPPIOCDEFS, + * SIOCGIFGENERIC ioctl. Then replace the cmd field by SPPPIOSDEFS, * modify the defs field as desired, and pass the struct ifreq now * to a SIOCSIFGENERIC ioctl. */ -#define SPPPIOGDEFS ((caddr_t)(('S' << 24) + (1 << 16) + sizeof(struct sppp))) -#define SPPPIOSDEFS ((caddr_t)(('S' << 24) + (2 << 16) + sizeof(struct sppp))) +#define SPPPIOGDEFS ((int)(('S' << 24) + (1 << 16) + sizeof(struct sppp))) +#define SPPPIOSDEFS ((int)(('S' << 24) + (2 << 16) + sizeof(struct sppp))) struct spppreq { int cmd; diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 1f9f387a389..283416a7c5a 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.71 2009/01/31 21:28:40 grange Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.72 2009/02/06 22:07:04 grange Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -4866,7 +4866,7 @@ sppp_params(struct sppp *sp, u_long cmd, void *data) return EFAULT; switch (spr.cmd) { - case (int)SPPPIOGDEFS: + case SPPPIOGDEFS: if (cmd != SIOCGIFGENERIC) return EINVAL; /* @@ -4887,7 +4887,7 @@ sppp_params(struct sppp *sp, u_long cmd, void *data) bzero(spr.defs.hisauth.challenge, AUTHKEYLEN); return copyout(&spr, (caddr_t)ifr->ifr_data, sizeof spr); - case (int)SPPPIOSDEFS: + case SPPPIOSDEFS: if (cmd != SIOCSIFGENERIC) return EINVAL; /* |