From 13defc3317e75eb1c300da13d71fcfca0afa9fea Mon Sep 17 00:00:00 2001 From: brian Date: Mon, 15 Jun 1998 19:06:25 +0000 Subject: Fix a rather nasty use of `static'. This caused a SEGV when running ``link * load label'' as we ended up recursing back into command_Interpret after nuking our command arg list. --- usr.sbin/ppp/systems.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.sbin/ppp/systems.c') diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c index 734cf62..e5583f6 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.36 1998/05/21 21:48:33 brian Exp $ + * $Id: systems.c,v 1.37 1998/06/15 19:05:47 brian Exp $ * * TODO: */ @@ -30,10 +30,10 @@ #include #include +#include "defs.h" #include "command.h" #include "log.h" #include "id.h" -#include "defs.h" #include "systems.h" #define issep(ch) ((ch) == ' ' || (ch) == '\t') @@ -252,7 +252,7 @@ ReadSystem(struct bundle *bundle, const char *name, const char *file, char filename[MAXPATHLEN]; int linenum; int argc; - char **argv; + char *argv[MAXARGS]; int allowcmd; int indent; char arg[LINE_LEN]; @@ -319,8 +319,8 @@ ReadSystem(struct bundle *bundle, const char *name, const char *file, break; len = strlen(cp); - command_Interpret(cp, len, &argc, &argv); - allowcmd = argc > 0 && !strcasecmp(*argv, "allow"); + argc = command_Interpret(cp, len, argv); + allowcmd = argc > 0 && !strcasecmp(argv[0], "allow"); if ((!doexec && allowcmd) || (doexec && !allowcmd)) command_Run(bundle, argc, (char const *const *)argv, prompt, name, cx); -- cgit v1.1