Mercurial > hg > th-libs
comparison th_datastruct.c @ 626:98c8bd80f633
Fix ringbuf size and n types.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 17 Jan 2020 19:13:57 +0200 |
parents | 935ee9a9f631 |
children | 964657ad0960 |
comparison
equal
deleted
inserted
replaced
625:dfed3754f7fd | 626:98c8bd80f633 |
---|---|
348 } | 348 } |
349 | 349 |
350 | 350 |
351 void th_ringbuf_free(th_ringbuf_t *buf) | 351 void th_ringbuf_free(th_ringbuf_t *buf) |
352 { | 352 { |
353 int i; | 353 for (size_t i = 0; i < buf->size; i++) |
354 | |
355 for (i = 0; i < buf->size; i++) | |
356 { | 354 { |
357 if (buf->data[i] != NULL) | 355 if (buf->data[i] != NULL) |
358 buf->deallocator(buf->data[i]); | 356 buf->deallocator(buf->data[i]); |
359 } | 357 } |
360 | 358 |