aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-07-18 06:08:27 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-07-18 06:08:27 +0000
commitf03c9f90d1112f1d73ff4491b9994bdc8b7cc40c (patch)
treece16698fbdaef371ab0e07339c3c885a21bef985 /sys
parent785b6ccaec8993d87a61e3b5b75dcb7e6d977692 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_bus.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 4417b235b5ceb..187995e7fd52d 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -1388,9 +1388,11 @@ resource_find(const char *name, int unit, const char *resname,
int
resource_int_value(const char *name, int unit, const char *resname, int *result)
{
- int error;
+ struct config_resource tmpres;
struct config_resource *res;
+ int error;
+ res = &tmpres;
if ((error = resource_find(name, unit, resname, &res)) != 0)
return error;
if (res->type != RES_INT)
@@ -1403,9 +1405,11 @@ int
resource_long_value(const char *name, int unit, const char *resname,
long *result)
{
- int error;
+ struct config_resource tmpres;
struct config_resource *res;
+ int error;
+ res = &tmpres;
if ((error = resource_find(name, unit, resname, &res)) != 0)
return error;
if (res->type != RES_LONG)
@@ -1418,9 +1422,11 @@ int
resource_string_value(const char *name, int unit, const char *resname,
char **result)
{
- int error;
+ struct config_resource tmpres;
struct config_resource *res;
+ int error;
+ res = &tmpres;
if ((error = resource_find(name, unit, resname, &res)) != 0)
return error;
if (res->type != RES_STRING)