mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Added mb_strdup() to complement other similar functions
This commit is contained in:
parent
65086fda3d
commit
253ce95bc9
@ -62,6 +62,15 @@ lp_strdup(linpool *lp, const char *c)
|
||||
return z;
|
||||
}
|
||||
|
||||
static inline char *
|
||||
mb_strdup(pool *p, const char *c)
|
||||
{
|
||||
size_t l = strlen(c) + 1;
|
||||
char *z = mb_alloc(p, l);
|
||||
memcpy(z, c, l);
|
||||
return z;
|
||||
}
|
||||
|
||||
static inline void
|
||||
memset32(void *D, u32 val, uint n)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user