summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2018-01-22 18:15:10 +0100
committerTobias Klauser <tklauser@distanz.ch>2018-01-22 18:15:10 +0100
commitb90d055be5dd30212ebd0c0a810a7f020df70321 (patch)
tree567cd072f7b54de1e9c82cc563fbb41ede343a5b
parentee58be50845991361c2e0d0324cc8a2e6ec57049 (diff)
ring: use xzmalloc_aligned
Use xzmalloc_aligned instead of open-coding it. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--ring.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ring.c b/ring.c
index b0feea0..b5c626c 100644
--- a/ring.c
+++ b/ring.c
@@ -49,8 +49,7 @@ void alloc_ring_frames_generic(struct ring *ring, size_t num, size_t size)
{
size_t i, len = num * sizeof(*ring->frames);
- ring->frames = xmalloc_aligned(len, CO_CACHE_LINE_SIZE);
- fmemset(ring->frames, 0, len);
+ ring->frames = xzmalloc_aligned(len, CO_CACHE_LINE_SIZE);
for (i = 0; i < num; ++i) {
ring->frames[i].iov_len = size;