Add memtest support.
[syslinux-debian/hramrach.git] / com32 / lib / lstrdup.c
blobd11efe7e4c66da13378f5db63c44df64878c983e
1 /*
2 * lstrdup.c
3 */
5 #include <string.h>
6 #include <stdlib.h>
7 #include <com32.h>
9 char *lstrdup(const char *s)
11 int l = strlen(s) + 1;
12 char *d = lmalloc(l);
14 if (d)
15 memcpy(d, s, l);
17 return d;