summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2009-03-29 15:10:49 +0000
committermarius <marius@FreeBSD.org>2009-03-29 15:10:49 +0000
commitaa09259c5bcc6d45a8e5cab2cb09d667d8d3c78e (patch)
treeb57c2dbd7aa1591f7c15515ad18785066221877c
parentb6886fc07bf36dc70112c995c8aa3da4f60e3688 (diff)
downloadFreeBSD-src-aa09259c5bcc6d45a8e5cab2cb09d667d8d3c78e.zip
FreeBSD-src-aa09259c5bcc6d45a8e5cab2cb09d667d8d3c78e.tar.gz
Unbreak OF_interpret() and its standard implementation after r186347.
-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 e097145..a05f072 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 4c33c9f..06b58d0 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);
OpenPOWER on IntegriCloud