From 84262d9f69aa6730c69f464b5b4fb7f6030bf329 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 13 Jun 2026 19:51:00 +0200 Subject: switch from tabs to spaces It was fun while it lasted, but I do believe that spaces are strictly superior, and clang-format struggles with tabs while using advanced configuration options. --- src/buf.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/buf.c') diff --git a/src/buf.c b/src/buf.c index 3efb6a3..1827767 100644 --- a/src/buf.c +++ b/src/buf.c @@ -14,36 +14,36 @@ #include struct buf { - uint32_t size; - const void* data; + uint32_t size; + const void* data; }; int buf_create(struct buf** _buf, const void* data, uint32_t size) { - struct buf* buf = malloc(sizeof(struct buf)); - if (!buf) { - log_errno("malloc"); - return -1; - } + struct buf* buf = malloc(sizeof(struct buf)); + if (!buf) { + log_errno("malloc"); + return -1; + } - buf->data = data; - buf->size = size; + buf->data = data; + buf->size = size; - *_buf = buf; - return 0; + *_buf = buf; + return 0; } int buf_create_from_string(struct buf** buf, const char* str) { - return buf_create(buf, str, strlen(str) + 1); + return buf_create(buf, str, strlen(str) + 1); } void buf_destroy(struct buf* buf) { - free(buf); + free(buf); } uint32_t buf_get_size(const struct buf* buf) { - return buf->size; + return buf->size; } const void* buf_get_data(const struct buf* buf) { - return buf->data; + return buf->data; } -- cgit v1.3