An addendum: it is possible, though of questionable utility, for a node

to have no properties at all. Do the right thing in such cases.
This commit is contained in:
Nathan Whitehorn 2013-11-06 14:38:53 +00:00
parent 0f3406e079
commit c67919895d

View File

@ -283,6 +283,8 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf,
/* Find the first prop in the node */
offset = fdt_first_property_offset(fdtp, offset);
if (offset < 0)
return (0); /* No properties */
if (previous != NULL) {
while (offset >= 0) {