# HG changeset patch # User Matti Hamalainen # Date 1670407063 -7200 # Node ID 79d06eb6d39f22855df1ee4f10ca8dc83e9d2091 # Parent d190dccc3ee66352f9a66f6454d0ba9709a93bab Rename "allocated" field to "is_allocated" in some structures. diff -r d190dccc3ee6 -r 79d06eb6d39f th_datastruct.c --- a/th_datastruct.c Wed Dec 07 00:17:57 2022 +0200 +++ b/th_datastruct.c Wed Dec 07 11:57:43 2022 +0200 @@ -318,7 +318,7 @@ return res; } - (*buf)->allocated = TRUE; + (*buf)->is_allocated = TRUE; return THERR_OK; } @@ -349,7 +349,7 @@ th_free(buf->data); - if (buf->allocated) + if (buf->is_allocated) th_free(buf); } @@ -391,7 +391,7 @@ return NULL; th_growbuf_init(buf, mingrow); - buf->allocated = TRUE; + buf->is_allocated = TRUE; return buf; } @@ -401,7 +401,7 @@ { th_free(buf->data); - if (buf->allocated) + if (buf->is_allocated) th_free(buf); } diff -r d190dccc3ee6 -r 79d06eb6d39f th_datastruct.h --- a/th_datastruct.h Wed Dec 07 00:17:57 2022 +0200 +++ b/th_datastruct.h Wed Dec 07 11:57:43 2022 +0200 @@ -59,7 +59,7 @@ size_t size; ///< Size of this ringbuffer in elements (aka pointers to data) size_t n; ///< Number of elements currently in the ringbuffer (@p n <= @p size) void (*deallocator)(void *data); ///< De-allocator function that frees one element. - BOOL allocated; + BOOL is_allocated; } th_ringbuf_t; @@ -77,7 +77,7 @@ typedef struct { - BOOL allocated; + BOOL is_allocated; uint8_t *data; size_t size, len, mingrow; } th_growbuf_t;