Rename the variable @defaultConn to @defaultPrivconn as it doesn't point to a default connection but to the private data used for the shared default connection of the test driver. Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx> --- src/test/test_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 5561d0c2ae70..d450be21704e 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -126,7 +126,7 @@ struct _testDriver { typedef struct _testDriver testDriver; typedef testDriver *testDriverPtr; -static testDriverPtr defaultConn; +static testDriverPtr defaultPrivconn; static int defaultConnections; static virMutex defaultLock = VIR_MUTEX_INITIALIZER; @@ -1314,7 +1314,7 @@ testOpenDefault(virConnectPtr conn) virMutexLock(&defaultLock); if (defaultConnections++) { - conn->privateData = defaultConn; + conn->privateData = defaultPrivconn; virMutexUnlock(&defaultLock); return VIR_DRV_OPEN_SUCCESS; } @@ -1354,7 +1354,7 @@ testOpenDefault(virConnectPtr conn) if (testOpenParse(privconn, NULL, ctxt) < 0) goto error; - defaultConn = privconn; + defaultPrivconn = privconn; ret = VIR_DRV_OPEN_SUCCESS; cleanup: virMutexUnlock(&defaultLock); @@ -1478,7 +1478,7 @@ static int testConnectClose(virConnectPtr conn) testDriverPtr privconn = conn->privateData; bool dflt = false; - if (privconn == defaultConn) { + if (privconn == defaultPrivconn) { dflt = true; virMutexLock(&defaultLock); if (--defaultConnections) { @@ -1492,7 +1492,7 @@ static int testConnectClose(virConnectPtr conn) testDriverFree(privconn); if (dflt) { - defaultConn = NULL; + defaultPrivconn = NULL; virMutexUnlock(&defaultLock); } -- 2.13.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list