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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220745
@ -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…
Reference in New Issue
Block a user