diff options
-rw-r--r-- | sys/dev/ofw/ofw_standard.c | 2 | ||||
-rw-r--r-- | sys/dev/ofw/openfirm.c | 4 |
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); |