From 6a596579bcccfa808d87678e2196e266d2cefecf Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Sat, 25 Apr 1998 09:16:23 +0000 Subject: [PATCH] Quieten gcc-2.8.1 --- usr.sbin/ppp/command.c | 8 +++++--- usr.sbin/ppp/ip.c | 8 +++++--- usr.sbin/ppp/loadalias.c | 5 +++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 1e0cf8bf2af..4658eea9fac 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.132 1998/03/12 02:23:35 brian Exp $ + * $Id: command.c,v 1.133 1998/03/13 01:36:08 brian Exp $ * */ #include @@ -1615,7 +1615,7 @@ AliasCommand(struct cmdargs const *arg) static int AliasEnable(struct cmdargs const *arg) { - if (arg->argc == 1) + if (arg->argc == 1) { if (strcasecmp(arg->argv[0], "yes") == 0) { if (!(mode & MODE_ALIAS)) { if (loadAliasHandlers(&VarAliasHandlers) == 0) { @@ -1633,6 +1633,7 @@ AliasEnable(struct cmdargs const *arg) } return 0; } + } return -1; } @@ -1641,7 +1642,7 @@ static int AliasOption(struct cmdargs const *arg) { unsigned param = (unsigned)arg->data; - if (arg->argc == 1) + if (arg->argc == 1) { if (strcasecmp(arg->argv[0], "yes") == 0) { if (mode & MODE_ALIAS) { VarPacketAliasSetMode(param, param); @@ -1655,6 +1656,7 @@ AliasOption(struct cmdargs const *arg) } LogPrintf(LogWARN, "alias not enabled\n"); } + } return -1; } #endif /* #ifndef NOALIAS */ diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index a784bb540b3..e9546e037da 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ip.c,v 1.38 1998/01/21 02:15:16 brian Exp $ + * $Id: ip.c,v 1.39 1998/03/13 01:36:09 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -427,12 +427,13 @@ IpInput(struct mbuf * bp) nb = ntohs(((struct ip *) tun.data)->ip_len); nb += sizeof tun - sizeof tun.data; nw = write(tun_out, &tun, nb); - if (nw != nb) + if (nw != nb) { if (nw == -1) LogPrintf(LogERROR, "IpInput: wrote %d, got %s\n", nb, strerror(errno)); else LogPrintf(LogERROR, "IpInput: wrote %d, got %d\n", nb, nw); + } if (iresult == PKT_ALIAS_FOUND_HEADER_FRAGMENT) { while ((fptr = VarPacketAliasGetFragment(tun.data)) != NULL) { @@ -442,12 +443,13 @@ IpInput(struct mbuf * bp) ((char *)fptr - sizeof tun + sizeof tun.data); nb += sizeof tun - sizeof tun.data; nw = write(tun_out, frag, nb); - if (nw != nb) + if (nw != nb) { if (nw == -1) LogPrintf(LogERROR, "IpInput: wrote %d, got %s\n", nb, strerror(errno)); else LogPrintf(LogERROR, "IpInput: wrote %d, got %d\n", nb, nw); + } free(frag); } } diff --git a/usr.sbin/ppp/loadalias.c b/usr.sbin/ppp/loadalias.c index a95de6506f3..6834a7b3cf3 100644 --- a/usr.sbin/ppp/loadalias.c +++ b/usr.sbin/ppp/loadalias.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: loadalias.c,v 1.13 1998/01/14 01:23:05 brian Exp $ + * $Id: loadalias.c,v 1.14 1998/01/19 22:59:57 brian Exp $ */ #include @@ -83,12 +83,13 @@ loadAliasHandlers(struct aliasHandlers * h) path = _PATH_ALIAS_PREFIX; env = getenv("_PATH_ALIAS_PREFIX"); - if (env) + if (env) { if (ID0realuid() == 0) path = env; else LogPrintf(LogALERT, "Ignoring environment _PATH_ALIAS_PREFIX" " value (%s)\n", env); + } dl = dlopen(path, RTLD_NOW); if (dl == (void *) 0) {