On Fri, May 26, 2017 at 07:59:01 -0400, John Ferlan wrote:
Rather than using goto cleanup on object find failure and having
cleanup
need to check if the obj was present before unlocking, just return immediately.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/test/test_driver.c | 37 +++++++++++++------------------------
1 file changed, 13 insertions(+), 24 deletions(-)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index c2697e8..da45542 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
[...]
@@ -3899,7 +3893,7 @@ testInterfaceDefineXML(virConnectPtr conn,
virCheckFlags(0, NULL);
testDriverLock(privconn);
- if ((def = virInterfaceDefParseString(xmlStr)) == NULL)
+ if (!(def = virInterfaceDefParseString(xmlStr)))
goto cleanup;
This hunk does something that is not advertised in the commit message.
ACK to the rest of the patch.