Fix error where error variable was assigned result of comparison,

instead of function return value.

Submitted by:	Przemyslaw Frasunek <przemyslaw frasunek.com>
MFC after:	4 days
This commit is contained in:
Gleb Smirnoff 2011-04-17 16:31:21 +00:00
parent 64acad05cd
commit 5633ca7116
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220745

View File

@ -596,7 +596,7 @@ ng_make_node(const char *typename, node_p *nodepp)
*/
if (type->constructor != NULL) {
if ((error = ng_make_node_common(type, nodepp)) == 0) {
if ((error = ((*type->constructor)(*nodepp)) != 0)) {
if ((error = ((*type->constructor)(*nodepp))) != 0) {
NG_NODE_UNREF(*nodepp);
}
}