<div dir="auto">Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><div dir="auto"><br></div><div dir="auto">M.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 20, 2017 7:48 AM, "Nicolai Hähnle" <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com">nicolai.haehnle@amd.com</a>><br>
<br>
There's no reason to use va_copy here.<br>
<br>
CID: 1418113<br>
---<br>
I have a slight preference for this variant.<br>
--<br>
src/amd/addrlib/core/<wbr>addrobject.cpp | 8 ++------<br>
1 file changed, 2 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/amd/addrlib/core/<wbr>addrobject.cpp b/src/amd/addrlib/core/<wbr>addrobject.cpp<br>
index dcdb1bffc2b..452feb5fac0 100644<br>
--- a/src/amd/addrlib/core/<wbr>addrobject.cpp<br>
+++ b/src/amd/addrlib/core/<wbr>addrobject.cpp<br>
@@ -209,29 +209,25 @@ VOID Object::operator delete(<br>
******************************<wbr>******************************<wbr>******************************<wbr>**********<br>
*/<br>
VOID Object::DebugPrint(<br>
const CHAR* pDebugString, ///< [in] Debug string<br>
...<br>
) const<br>
{<br>
#if DEBUG<br>
if (m_client.callbacks.debugPrint != NULL)<br>
{<br>
- va_list ap;<br>
-<br>
- va_start(ap, pDebugString);<br>
-<br>
ADDR_DEBUGPRINT_INPUT debugPrintInput = {0};<br>
<br>
debugPrintInput.size = sizeof(ADDR_DEBUGPRINT_INPUT);<br>
debugPrintInput.pDebugString = const_cast<CHAR*>(<wbr>pDebugString);<br>
debugPrintInput.hClient = m_client.handle;<br>
- va_copy(debugPrintInput.ap, ap);<br>
+ va_start(debugPrintInput.ap, pDebugString);<br>
<br>
m_client.callbacks.debugPrint(<wbr>&debugPrintInput);<br>
<br>
- va_end(ap);<br>
+ va_end(debugPrintInput.ap);<br>
}<br>
#endif<br>
}<br>
<br>
} // Addr<br>
--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>