mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-21 06:48:09 +02:00
24 lines
276 B
C
24 lines
276 B
C
/**
|
|
* String utils.
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "eglstring.h"
|
|
|
|
|
|
char *
|
|
_eglstrdup(const char *s)
|
|
{
|
|
if (s) {
|
|
int l = strlen(s);
|
|
char *s2 = malloc(l + 1);
|
|
if (s2)
|
|
strcpy(s2, s);
|
|
return s2;
|
|
}
|
|
return NULL;
|
|
}
|
|
|
|
|
|
|