diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-03-15 17:10:17 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-03-15 17:10:17 +0000 |
| commit | 09b58bbc77a702bb5deb2f5c3deb8d9a6ebb59cc (patch) | |
| tree | ea92a6fc3638831378eb88b0380a4dfe06bfb611 /usr.sbin/sade/variable.c | |
| parent | 9f5f4b12f45eb8c14f1448aefa4a64b3427bf24f (diff) | |
Notes
Diffstat (limited to 'usr.sbin/sade/variable.c')
| -rw-r--r-- | usr.sbin/sade/variable.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/sade/variable.c b/usr.sbin/sade/variable.c index c5fcc2788827..610fb3de3187 100644 --- a/usr.sbin/sade/variable.c +++ b/usr.sbin/sade/variable.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: variable.c,v 1.21 1997/10/12 16:21:21 jkh Exp $ + * $Id: variable.c,v 1.22 1998/03/10 17:24:08 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -183,15 +183,18 @@ variable_check(char *data) if ((cp3 = index(cp, '"')) != NULL) *cp3 = '\0'; } - if ((cp3 = index(cp, ',')) != NULL) + else if ((cp3 = index(cp, ',')) != NULL) *cp3 = '\0'; cp2 = getenv(tmp); - - if (cp2) - return !strcmp(cp, cp2); + if (cp2) { + if (!*cp) + return TRUE; + else + return !strcmp(cp, cp2); + } else return FALSE; } else - return getenv(tmp) ? 1 : 0; + return getenv(tmp) ? TRUE : FALSE; } |
