diff --git a/Makefile b/Makefile index 6b1324e..760129d 100644 --- a/Makefile +++ b/Makefile @@ -57,9 +57,6 @@ asm: $(ASMS) $(OBJECTS) wc -l $(ASMS) size $(OBJECTS) -tidy: - @clang-tidy $(C_SOURCES) -- $(CFLAGS) - format: clang-format -i $(C_SOURCES) $(C_HEADERS) diff --git a/ringbuf.c b/ringbuf.c index 9ea1a6d..23adb94 100644 --- a/ringbuf.c +++ b/ringbuf.c @@ -40,9 +40,9 @@ rb_init(struct RingBuf *rb, rb_size_t capacity, ALLOC_T malloc_fn, } void -rb_destroy(struct RingBuf *rb, FREE_T free_fn) +rb_destroy(struct RingBuf *rb, void(free)()) { - free_fn(rb->buffer); + free(rb->buffer); } void diff --git a/ringbuf.h b/ringbuf.h index 6d6d01f..efffe50 100644 --- a/ringbuf.h +++ b/ringbuf.h @@ -12,9 +12,6 @@ typedef void *(*ALLOC_T)(rb_size_t); /** Signature of memcpy */ typedef void *(*MEMCPY_T)(void *, const void *, rb_size_t); -/** Signature of free */ -typedef void (*FREE_T)(void *); - /** * @brief Ring buffer, also known as circular buffer. */ @@ -29,7 +26,7 @@ struct RingBuf { } __attribute__((packed)); /* - * Considerations: One hot encoding for the enum values + * Considerations: One hot encoding for the enum values * (8 bit each with -fshort-enums) */