diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 83d426db08da..f08421ce047f 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.98 1997/11/11 22:58:10 brian Exp $ + * $Id: command.c,v 1.99 1997/11/12 02:10:05 brian Exp $ * */ #include @@ -155,8 +155,8 @@ DialCommand(struct cmdtab const * cmdlist, int argc, char **argv) return 0; } - if (argc > 0 && LoadCommand(cmdlist, argc, argv) == -1) - return -1; + if (argc > 0 && (res = LoadCommand(cmdlist, argc, argv)) != 0) + return res; tries = 0; do { diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c index a070535189a5..b7ed109a6f12 100644 --- a/usr.sbin/ppp/systems.c +++ b/usr.sbin/ppp/systems.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: systems.c,v 1.23 1997/11/11 22:58:13 brian Exp $ + * $Id: systems.c,v 1.24 1997/11/12 15:50:38 brian Exp $ * * TODO: */ @@ -350,9 +350,10 @@ LoadCommand(struct cmdtab const * list, int argc, char **argv) else name = "default"; - if (!ValidSystem(name)) + if (!ValidSystem(name)) { LogPrintf(LogERROR, "%s: Label not allowed\n", name); - else if (SelectSystem(name, CONFFILE) < 0) { + return 1; + } else if (SelectSystem(name, CONFFILE) < 0) { LogPrintf(LogWARN, "%s: not found.\n", name); return -1; } else