Make sure all character pointers are properly initialized; this was

mismerged from the MAC tree, and didn't get picked up because warnings
are not normally fatal in per-module builds, only when they are linked
into a kernel (such as LINT).

Reported by:	des and the technicolor tinderbox
Approved by:	re (scottl)
This commit is contained in:
Robert Watson 2003-05-30 17:02:36 +00:00
parent 9abece6475
commit c2ea1fec5b

View File

@ -672,14 +672,12 @@ mac_mls_parse_element(struct mac_mls_element *element, char *string)
static int
mac_mls_parse(struct mac_mls *mac_mls, char *string)
{
char *range, *rangeend, *rangehigh, *rangelow, *single;
char *rangehigh, *rangelow, *single;
int error;
single = strsep(&string, "(");
if (string == NULL) {
string = single;
if (*single == '\0')
single = NULL;
}
if (string != NULL) {
rangelow = strsep(&string, "-");
@ -690,6 +688,9 @@ mac_mls_parse(struct mac_mls *mac_mls, char *string)
return (EINVAL);
if (*string != '\0')
return (EINVAL);
} else {
rangelow = NULL;
rangehigh = NULL;
}
KASSERT((rangelow != NULL && rangehigh != NULL) ||