Use asprintf() instead of Xasprintf()

This driver is Linux-only, so it's safe to assume asprintf() here.

It's one of the last few drivers ever using that function, so
blocking its removal from Xorg ABI.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-03-04 17:44:28 +01:00
parent 3a61617ccd
commit 38c90b5593

View File

@@ -10,6 +10,10 @@
#include "config.h"
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
@@ -911,7 +915,7 @@ AddV4LEnc(XF86VideoEncodingPtr enc, int entry,
char *name;
#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(10, 0)
if (Xasprintf(&name, "%s-%s", norm, fixname(input)) < 0)
if (asprintf(&name, "%s-%s", norm, fixname(input)) < 0)
name = NULL;
#else
name = Xprintf("%s-%s", norm, fixname(input));