diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-24 22:54:57 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-24 22:54:57 +0000 |
commit | 493b98c52447461aca5a5bdc41aca7ef1e8e893b (patch) | |
tree | b078ef3d235abe9207fbd4453ab4de5c70457118 | |
parent | 2c1c89c048d61061e6e333c07db1335764e8dbc1 (diff) | |
download | obf-493b98c52447461aca5a5bdc41aca7ef1e8e893b.tar.gz obf-493b98c52447461aca5a5bdc41aca7ef1e8e893b.tar.bz2 obf-493b98c52447461aca5a5bdc41aca7ef1e8e893b.zip |
Change vec_append signature to ensure ptr is constant
-rw-r--r-- | lib.c | 2 | ||||
-rw-r--r-- | lib.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -67,7 +67,7 @@ char *fread_all(FILE *fp) return buffer.data; } -void vec_append(vec_t *vec, void *ptr, u64 size) +void vec_append(vec_t *vec, const void *const ptr, u64 size) { vec_ensure_free(vec, size); memcpy(vec->data + vec->size, ptr, size); @@ -41,7 +41,7 @@ typedef struct u8 *data; } vec_t; -void vec_append(vec_t *vec, void *ptr, u64 size); +void vec_append(vec_t *vec, const void *const ptr, u64 size); void vec_ensure(vec_t *vec, u64 abs_size); void vec_ensure_free(vec_t *vec, u64 rel_size); void vec_free(vec_t *vec); |