aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-09-20 16:43:00 +0200
committerNicolai Hähnle <[email protected]>2017-09-21 10:59:36 +0200
commit34126ed248482b630ca567e4cdb05d4dc1ba016c (patch)
tree5bded630397b7275fc3cde367f955b61d429d403
parent8e9e339c530c7b82b5a29d4b3183e8f5a01eae28 (diff)
amd/addrlib: fix missing va_end() after va_copy()
There's no reason to use va_copy here. CID: 1418113 Reviewed-by: Eric Engestrom <[email protected]> Fixes: e7fc664b91a5d886c270 ("winsys/amdgpu: add addrlib - texture addressing and alignment calculator") Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/amd/addrlib/core/addrobject.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/amd/addrlib/core/addrobject.cpp b/src/amd/addrlib/core/addrobject.cpp
index dcdb1bffc2b..452feb5fac0 100644
--- a/src/amd/addrlib/core/addrobject.cpp
+++ b/src/amd/addrlib/core/addrobject.cpp
@@ -216,20 +216,16 @@ VOID Object::DebugPrint(
#if DEBUG
if (m_client.callbacks.debugPrint != NULL)
{
- va_list ap;
-
- va_start(ap, pDebugString);
-
ADDR_DEBUGPRINT_INPUT debugPrintInput = {0};
debugPrintInput.size = sizeof(ADDR_DEBUGPRINT_INPUT);
debugPrintInput.pDebugString = const_cast<CHAR*>(pDebugString);
debugPrintInput.hClient = m_client.handle;
- va_copy(debugPrintInput.ap, ap);
+ va_start(debugPrintInput.ap, pDebugString);
m_client.callbacks.debugPrint(&debugPrintInput);
- va_end(ap);
+ va_end(debugPrintInput.ap);
}
#endif
}