summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/systems.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-06-15 19:06:25 +0000
committerbrian <brian@FreeBSD.org>1998-06-15 19:06:25 +0000
commit13defc3317e75eb1c300da13d71fcfca0afa9fea (patch)
treeb381951b12d7887e75222845d5020654bac355ca /usr.sbin/ppp/systems.c
parent3f8652a3018ca60b9dd6e6cabb477c7abf044e98 (diff)
downloadFreeBSD-src-13defc3317e75eb1c300da13d71fcfca0afa9fea.zip
FreeBSD-src-13defc3317e75eb1c300da13d71fcfca0afa9fea.tar.gz
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.
Diffstat (limited to 'usr.sbin/ppp/systems.c')
-rw-r--r--usr.sbin/ppp/systems.c10
1 files changed, 5 insertions, 5 deletions
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 <string.h>
#include <unistd.h>
+#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);
OpenPOWER on IntegriCloud