use asprintf() instead of Xasprintf()

All our supported platforms should have asprintf(), so we don't need
the Xserver's own implementation anymore.

It's one of two drivers blocking removal of this function form server 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 18:01:43 +01:00
parent 1644e3a19d
commit 2e2af79801

View File

@@ -53,6 +53,11 @@ authorization from the XFree86 Project and silicon Motion.
#include "config.h"
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdio.h>
#include "smi.h"
#include "smi_video.h"
@@ -519,7 +524,7 @@ SMI_AddEncoding(XF86VideoEncodingPtr enc, int i,
norm_string = VideoNorms[norm].name;
input_string = VideoInputs[input].name;
snprintf(channel_string, sizeof(channel_string), "%d", channel);
if (Xasprintf(&name_string, "%s-%s-%s",
if (asprintf(&name_string, "%s-%s-%s",
norm_string, input_string, channel_string) < 0)
LEAVE(-1);