mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
When counting nodes second time, use the same criteria as for
the first time. PR: kern/98529 Submitted by: Michael Heyman
This commit is contained in:
parent
f67dea8260
commit
b96baf0a65
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159373
|
@ -2654,15 +2654,15 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
|
|||
LIST_FOREACH(node, &ng_nodelist, nd_nodes) {
|
||||
struct nodeinfo *const np = &nl->nodeinfo[nl->numnames];
|
||||
|
||||
if (NG_NODE_NOT_VALID(node))
|
||||
continue;
|
||||
if (!unnamed && (! NG_NODE_HAS_NAME(node)))
|
||||
continue;
|
||||
if (nl->numnames >= num) {
|
||||
log(LOG_ERR, "%s: number of %s changed\n",
|
||||
__func__, "nodes");
|
||||
break;
|
||||
}
|
||||
if (NG_NODE_NOT_VALID(node))
|
||||
continue;
|
||||
if (!unnamed && (! NG_NODE_HAS_NAME(node)))
|
||||
continue;
|
||||
if (NG_NODE_HAS_NAME(node))
|
||||
strcpy(np->name, NG_NODE_NAME(node));
|
||||
strcpy(np->type, node->nd_type->name);
|
||||
|
|
Loading…
Reference in a new issue