[v4,8/8] egl/main: use cross platform implementation 'util_vsnprintf'

Submitted by andrey simiklit on Sept. 6, 2018, 2:43 p.m.

Details

Message ID 1536245039-22231-10-git-send-email-asimiklit.work@gmail.com
State New
Headers show
Series "mesa/util: add missing va_end() after va_copy()" ( rev: 12 ) in Mesa

Not browsing as part of any series.

Commit Message

andrey simiklit Sept. 6, 2018, 2:43 p.m.
From: Andrii Simiklit <andrii.simiklit@globallogic.com>

I guess it makes this implementation more portable.

Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
---
 src/egl/main/egllog.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/egl/main/egllog.c b/src/egl/main/egllog.c
index c223f49..d21b070 100644
--- a/src/egl/main/egllog.c
+++ b/src/egl/main/egllog.c
@@ -42,6 +42,7 @@ 
 #include <strings.h>
 #include "c11/threads.h"
 #include "util/macros.h"
+#include "util/u_string.h"
 
 #include "egllog.h"
 
@@ -154,7 +155,7 @@  _eglLog(EGLint level, const char *fmtStr, ...)
    mtx_lock(&logging.mutex);
 
    va_start(args, fmtStr);
-   ret = vsnprintf(msg, MAXSTRING, fmtStr, args);
+   ret = util_vsnprintf(msg, MAXSTRING, fmtStr, args);
    if (ret < 0 || ret >= MAXSTRING)
       strcpy(msg, "<message truncated>");
    va_end(args);