diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-02-11 21:29:57 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-03-07 16:21:01 +0100 |
commit | 819dc8bbbc778fc0df326c687dcdda4c2fd2b683 (patch) | |
tree | 4d543b9623d1ce81cc45ced96906dd0acd7f013a /nhrpd/zbuf.c | |
parent | nhrpd: implement next hop resolution protocol (diff) | |
download | frr-819dc8bbbc778fc0df326c687dcdda4c2fd2b683.tar.xz frr-819dc8bbbc778fc0df326c687dcdda4c2fd2b683.zip |
nhrpd: adapt to API changes
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'nhrpd/zbuf.c')
-rw-r--r-- | nhrpd/zbuf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nhrpd/zbuf.c b/nhrpd/zbuf.c index ead7cfd29..97962b9ab 100644 --- a/nhrpd/zbuf.c +++ b/nhrpd/zbuf.c @@ -14,16 +14,17 @@ #include "zassert.h" #include "zbuf.h" #include "memory.h" -#include "memtypes.h" #include "nhrpd.h" #define ERRNO_IO_RETRY(EN) (((EN) == EAGAIN) || ((EN) == EWOULDBLOCK) || ((EN) == EINTR)) +DEFINE_MTYPE_STATIC(NHRPD, ZBUF_DATA, "NHRPD zbuf data") + struct zbuf *zbuf_alloc(size_t size) { struct zbuf *zb; - zb = XMALLOC(MTYPE_STREAM_DATA, sizeof(*zb) + size); + zb = XMALLOC(MTYPE_ZBUF_DATA, sizeof(*zb) + size); if (!zb) return NULL; @@ -46,7 +47,7 @@ void zbuf_init(struct zbuf *zb, void *buf, size_t len, size_t datalen) void zbuf_free(struct zbuf *zb) { if (zb->allocated) - XFREE(MTYPE_STREAM_DATA, zb); + XFREE(MTYPE_ZBUF_DATA, zb); } void zbuf_reset(struct zbuf *zb) |