[sr-dev] strdup equivalent in pkg_ style
Konstantin M.
evilzluk at gmail.com
Sat Dec 8 21:47:33 CET 2012
Hi dev team,
Would be good to have strdup in pkg_ style and use our memory manager,
something like this (or using macroses):
char *pkg_strdup(const char *s) {
char *p = pkg_malloc(strlen(s) + 1);
if(p) { strcpy(p, s); }
return p;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20121208/1f8f0c20/attachment.htm>
More information about the sr-dev
mailing list