ref: 59747e56d427dd7c5718042ee87d1b73231fe55a
dir: /lib/xstrdup.c/
/* See LICENSE file for copyright and license details. */ #include <string.h> #include "../inc/cc.h" char * xstrdup(const char *s) { size_t len = strlen(s) + 1; char *p = xmalloc(len); return memcpy(p, s, len); }