From: Andrii Simiklit <andrii.simik...@globallogic.com>

This patch improve usage of [v][s][n]printf functions.
Fixes cross platform implementation of vsnprintf

v2: Linux man about vXXXprintf functions:
    "These functions do not call the va_end macro. Because they
     invoke the va_arg  macro, the value of ap is undefined after the call"
     So we should have instance copy of va_list for each 'vXXXprintf' call.

v3: Fixed case when malloc returns 0 in util_vasprintf

v4: The single patch was separated to the patch series

Andrii Simiklit (8):
  apple/glx/log: added missing va_end() after va_copy()
  mesa/util: don't use the same 'va_list' instance twice
  mesa/util: don't ignore NULL returned from 'malloc'
  mesa/util: add missing va_end() after va_copy()
  mesa/main: don't use win _vsnprintf. there is 'util_vsnprintf'
    function
  mesa/util: use cross platform implementation 'util_vsnprintf'
  radv: use cross platform implementation 'util_vsnprintf'
  egl/main: use cross platform implementation 'util_vsnprintf'

 src/amd/vulkan/radv_util.c    |  5 +++--
 src/egl/main/egllog.c         |  3 ++-
 src/glx/apple/apple_glx_log.c |  1 +
 src/mesa/main/imports.c       | 11 +++++------
 src/util/ralloc.c             | 25 ++++++-------------------
 src/util/u_string.h           | 10 ++++++++--
 6 files changed, 25 insertions(+), 30 deletions(-)

-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to