In the future we will perform more actions if ns.parse
is present. Decouple the condition from the actual call.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
*/
def->ns = xmlopt->ns;
- if (def->ns.parse &&
- (def->ns.parse)(ctxt, &def->namespaceData) < 0)
- goto error;
+ if (def->ns.parse) {
+ if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
+ goto error;
+ }
return def;
if (xmlopt)
def->ns = xmlopt->ns;
- if (def->ns.parse &&
- (def->ns.parse)(ctxt, &def->namespaceData) < 0)
- goto error;
+ if (def->ns.parse) {
+ if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
+ goto error;
+ }
ctxt->node = save;
return def;
/* Make a copy of all the callback pointers here for easier use,
* especially during the virStoragePoolSourceClear method */
def->ns = options->ns;
- if (def->ns.parse &&
- (def->ns.parse)(ctxt, &def->namespaceData) < 0)
- return NULL;
+ if (def->ns.parse) {
+ if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
+ return NULL;
+ }
VIR_STEAL_PTR(ret, def);
return ret;