From 5264ca02985e3a51c39dd64c7257ee68c400aaa0 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Wed, 10 Jun 1998 00:16:07 +0000 Subject: [PATCH] Fix a couple of warnings noted with -Wall on FreeBSD-2.1.5. Pointed out by: Charlie Sorsby --- usr.sbin/ppp/command.c | 6 +++--- usr.sbin/ppp/route.c | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 7279cff2f22..eb0a7d0095c 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.137 1998/06/06 23:00:33 brian Exp $ + * $Id: command.c,v 1.138 1998/06/08 20:23:44 brian Exp $ * */ #include @@ -124,7 +124,7 @@ #define NEG_DNS 50 const char Version[] = "2.0-beta"; -const char VersionDate[] = "$Date: 1998/06/06 23:00:33 $"; +const char VersionDate[] = "$Date: 1998/06/08 20:23:44 $"; static int ShowCommand(struct cmdargs const *); static int TerminalCommand(struct cmdargs const *); @@ -384,7 +384,7 @@ ShellCommand(struct cmdargs const *arg, int bg) p = getpid(); if (daemon(1, 1) == -1) { - log_Printf(LogERROR, "%d: daemon: %s\n", p, strerror(errno)); + log_Printf(LogERROR, "%d: daemon: %s\n", (int)p, strerror(errno)); exit(1); } } else if (arg->prompt) diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c index d87f87997b8..da033f788e7 100644 --- a/usr.sbin/ppp/route.c +++ b/usr.sbin/ppp/route.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: route.c,v 1.42.2.25 1998/05/16 21:19:00 brian Exp $ + * $Id: route.c,v 1.45 1998/05/21 21:48:10 brian Exp $ * */ @@ -291,8 +291,6 @@ route_Show(struct cmdargs const *arg) log_Printf(LogERROR, "route_Show: sysctl: estimate: %s\n", strerror(errno)); return (1); } - if (needed < 0) - return (1); sp = malloc(needed); if (sp == NULL) return (1); @@ -365,8 +363,6 @@ route_IfDelete(struct bundle *bundle, int all) strerror(errno)); return; } - if (needed < 0) - return; sp = malloc(needed); if (sp == NULL)