diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-13 19:51:00 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-13 19:51:04 +0200 |
| commit | 84262d9f69aa6730c69f464b5b4fb7f6030bf329 (patch) | |
| tree | 44a506c7c10923e32ab2063594ec4049b988e97a /src/buf.c | |
| parent | add .git-blame-ignore-revs (diff) | |
| download | cimple-84262d9f69aa6730c69f464b5b4fb7f6030bf329.tar.gz cimple-84262d9f69aa6730c69f464b5b4fb7f6030bf329.zip | |
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.
Diffstat (limited to 'src/buf.c')
| -rw-r--r-- | src/buf.c | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -14,36 +14,36 @@ #include <string.h> 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; } |
