]> mj.ucw.cz Git - libucw.git/blob - ucw/alloc_str.c
URLs: Fixed some broken comparisons of possibly signed chars.
[libucw.git] / ucw / alloc_str.c
1 /*
2  *      UCW Library -- String Allocation
3  *
4  *      (c) 1997 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #include "ucw/lib.h"
11
12 #include <string.h>
13
14 char *
15 xstrdup(const char *s)
16 {
17   uns l = strlen(s) + 1;
18   return memcpy(xmalloc(l), s, l);
19 }