From 34126ed248482b630ca567e4cdb05d4dc1ba016c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 20 Sep 2017 16:43:00 +0200 Subject: [PATCH] amd/addrlib: fix missing va_end() after va_copy() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There's no reason to use va_copy here. CID: 1418113 Reviewed-by: Eric Engestrom Fixes: e7fc664b91a5d886c270 ("winsys/amdgpu: add addrlib - texture addressing and alignment calculator") Reviewed-by: Marek Olšák --- src/amd/addrlib/core/addrobject.cpp | 8 ++------ 1 file 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(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 } -- 2.30.2