mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
Fix a core dump when the user gives "-w" without an "="
This commit is contained in:
parent
c78fc4f444
commit
019d933039
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15172
@ -40,7 +40,7 @@ static char copyright[] =
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */
|
||||
static const char rcsid[] =
|
||||
"$Id: sysctl.c,v 1.8 1995/11/17 16:28:42 phk Exp $";
|
||||
"$Id: sysctl.c,v 1.9 1995/12/21 12:39:25 phk Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -137,6 +137,9 @@ parse(char *string)
|
||||
cp++;
|
||||
newval = cp;
|
||||
newsize = strlen(cp);
|
||||
} else {
|
||||
if (wflag)
|
||||
usage();
|
||||
}
|
||||
len = name2oid(bufp, mib);
|
||||
|
||||
|
@ -40,7 +40,7 @@ static char copyright[] =
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */
|
||||
static const char rcsid[] =
|
||||
"$Id: sysctl.c,v 1.8 1995/11/17 16:28:42 phk Exp $";
|
||||
"$Id: sysctl.c,v 1.9 1995/12/21 12:39:25 phk Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -137,6 +137,9 @@ parse(char *string)
|
||||
cp++;
|
||||
newval = cp;
|
||||
newsize = strlen(cp);
|
||||
} else {
|
||||
if (wflag)
|
||||
usage();
|
||||
}
|
||||
len = name2oid(bufp, mib);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user