blob: 9f347db8766f589419816f1adc5cd617284677d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "config.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>
char *xine_private_strndup(const char *s, size_t n) {
char *ret;
ret = malloc (n + 1);
strncpy(ret, s, n);
ret[n] = '\0';
return ret;
}
|