Home
       xstrdup.c - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
       xstrdup.c (158B)
       ---
            1 #include <string.h>
            2 #include <scc/scc.h>
            3 
            4 char *
            5 xstrdup(const char *s)
            6 {
            7         size_t len = strlen(s) + 1;
            8         char *p = xmalloc(len);
            9 
           10         return memcpy(p, s, len);
           11 }