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:
Gleb Smirnoff 2006-06-07 12:42:15 +00:00
parent f67dea8260
commit b96baf0a65
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159373

View File

@ -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);