jitterbug/util.c

9 lines
169 B
C
Raw Normal View History

2022-12-29 20:10:36 +02:00
#include "util.h"
char *string_dup(const char *s)
{
size_t len = strlen(s) + 1;
char *p = (char*)malloc(len);
return p ? (char*)memcpy(p, s, len) : NULL;
}