0
0
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:
Maria Matejka 2024-09-04 20:34:54 +02:00
parent 65086fda3d
commit 253ce95bc9

View File

@ -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)
{