From b1a4a6fa7b233abbca763178095b076d409cce80 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 29 Oct 2015 18:56:11 +0100 Subject: ring: alloc_ring_frames_generic make types size_t Lets make i and num as size_t, there's no particular reason for them to be int. At least i is used to setup iov_base offsets. Signed-off-by: Daniel Borkmann --- ring.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ring.c') diff --git a/ring.c b/ring.c index dc58a07..2a0a6b5 100644 --- a/ring.c +++ b/ring.c @@ -45,10 +45,9 @@ void mmap_ring_generic(int sock, struct ring *ring) panic("Cannot mmap {TX,RX}_RING!\n"); } -void alloc_ring_frames_generic(struct ring *ring, int num, size_t size) +void alloc_ring_frames_generic(struct ring *ring, size_t num, size_t size) { - int i; - size_t len = num * sizeof(*ring->frames); + size_t i, len = num * sizeof(*ring->frames); ring->frames = xmalloc_aligned(len, CO_CACHE_LINE_SIZE); fmemset(ring->frames, 0, len); -- cgit v1.2.3-54-g00ecf