clang-format: Minor whitespace issues.

These are entirely my fault, sadly.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
This commit is contained in:
Dan Cross 2018-10-09 17:12:43 +00:00 committed by Andrew Pamment
parent 54093060cb
commit f74c418f47
2 changed files with 12 additions and 12 deletions

View File

@ -261,9 +261,9 @@ struct blog_entry_t {
}; };
struct ptr_vector { struct ptr_vector {
size_t len; size_t len;
size_t capacity; size_t capacity;
void **ptrs; void **ptrs;
}; };
extern void init_ptr_vector(struct ptr_vector *vec); extern void init_ptr_vector(struct ptr_vector *vec);

View File

@ -134,17 +134,17 @@ int ptr_vector_append(struct ptr_vector *vec, void *p) {
if (vec->len == vec->capacity) { if (vec->len == vec->capacity) {
void **ps; void **ps;
size_t oldcap = vec->capacity; size_t oldcap = vec->capacity;
if (vec->capacity == 0) if (vec->capacity == 0)
vec->capacity = 1; vec->capacity = 1;
else else
vec->capacity *= 2; vec->capacity *= 2;
ps = realloc(vec->ptrs, vec->capacity * sizeof(void *)); ps = realloc(vec->ptrs, vec->capacity * sizeof(void *));
assert(ps != NULL); assert(ps != NULL);
memset(vec->ptrs + oldcap, 0, (vec->capacity - oldcap) * sizeof(void *)); memset(vec->ptrs + oldcap, 0, (vec->capacity - oldcap) * sizeof(void *));
vec->ptrs = ps; vec->ptrs = ps;
} }
vec->ptrs[vec->len] = p; vec->ptrs[vec->len] = p;
++vec->len; ++vec->len;
return 1; return 1;
} }