aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-05-09 21:13:37 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-05-09 21:13:37 +0000
commit3c600cfb6cb4e8670da32bd483a1917988d2956b (patch)
tree90512cab70fd84a952cfe17d71b905812dc1d697 /sys/dev
parent6bc913d9eeeadaa703b545b8861a6f1f01f85890 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 90c712449560..b591ae87cf86 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1556,16 +1556,17 @@ acpi_name(ACPI_HANDLE handle)
int
acpi_avoid(ACPI_HANDLE handle)
{
- char *cp, *np;
+ char *cp, *env, *np;
int len;
np = acpi_name(handle);
if (*np == '\\')
np++;
- if ((cp = getenv("debug.acpi.avoid")) == NULL)
+ if ((env = getenv("debug.acpi.avoid")) == NULL)
return(0);
/* scan the avoid list checking for a match */
+ cp = env;
for (;;) {
while ((*cp != 0) && isspace(*cp))
cp++;
@@ -1575,12 +1576,12 @@ acpi_avoid(ACPI_HANDLE handle)
while ((cp[len] != 0) && !isspace(cp[len]))
len++;
if (!strncmp(cp, np, len)) {
- freeenv(cp);
+ freeenv(env);
return(1);
}
cp += len;
}
- freeenv(cp);
+ freeenv(env);
return(0);
}