Skip to content

Commit 0c7799b

Browse files
committed
glamor: replace XNFvasprintf() by vasprintf()
No need for carrying around our own (incomplete) implementation of a standard libc function. Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
1 parent 6c92480 commit 0c7799b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

glamor/glamor_core.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ glamor_link_glsl_prog(ScreenPtr screen, GLint prog, const char *format, ...)
9393
va_list va;
9494

9595
va_start(va, format);
96-
XNFvasprintf(&label, format, va);
96+
if (vasprintf(&label, format, va) == -1) {
97+
ErrorF("glamor_link_glsl_prog() memory allocation failed\n");
98+
va_end(va);
99+
return FALSE;
100+
}
97101
glObjectLabel(GL_PROGRAM, prog, -1, label);
98102
free(label);
99103
va_end(va);

0 commit comments

Comments
 (0)