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:
parent
64acad05cd
commit
5633ca7116
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user