aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ofw
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2009-03-29 15:10:49 +0000
committerMarius Strobl <marius@FreeBSD.org>2009-03-29 15:10:49 +0000
commit49bbb93c07f8c6ec6fce57d7143e7272131c54f0 (patch)
treeb57c2dbd7aa1591f7c15515ad18785066221877c /sys/dev/ofw
parentb1a0a22d44cbfd0f84e3d1140e77464a51b9370d (diff)
Notes
Diffstat (limited to 'sys/dev/ofw')
-rw-r--r--sys/dev/ofw/ofw_standard.c2
-rw-r--r--sys/dev/ofw/openfirm.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ofw/ofw_standard.c b/sys/dev/ofw/ofw_standard.c
index e09714572f92..a05f072abc1b 100644
--- a/sys/dev/ofw/ofw_standard.c
+++ b/sys/dev/ofw/ofw_standard.c
@@ -204,7 +204,7 @@ ofw_std_interpret(ofw_t ofw, const char *cmd, int nreturns,
}
status = args.slot[i++];
while (i < 1 + nreturns)
- returns[j] = args.slot[i++];
+ returns[j++] = args.slot[i++];
return (status);
}
diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c
index 4c33c9f87b50..06b58d06331f 100644
--- a/sys/dev/ofw/openfirm.c
+++ b/sys/dev/ofw/openfirm.c
@@ -164,9 +164,11 @@ OF_interpret(const char *cmd, int nreturns, ...)
int status;
status = OFW_INTERPRET(ofw_obj, cmd, nreturns, slots);
+ if (status == -1)
+ return (status);
va_start(ap, nreturns);
- while (i < 1 + nreturns)
+ while (i < nreturns)
*va_arg(ap, cell_t *) = slots[i++];
va_end(ap);