diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2003-05-30 17:02:36 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2003-05-30 17:02:36 +0000 |
| commit | c2ea1fec5ba23c0d3ef5422278b8f92770d98d45 (patch) | |
| tree | 0fedbf500de22d1fac618965eceb498ae5afeeff /sys/security/mac_mls/mac_mls.c | |
| parent | 9abece6475a919fad99077b47411185b6d559494 (diff) | |
Notes
Diffstat (limited to 'sys/security/mac_mls/mac_mls.c')
| -rw-r--r-- | sys/security/mac_mls/mac_mls.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c index 6501f9c8c81a..bd595b5e75bf 100644 --- a/sys/security/mac_mls/mac_mls.c +++ b/sys/security/mac_mls/mac_mls.c @@ -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) || |
