aboutsummaryrefslogtreecommitdiffstats
path: root/src/zload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zload.c')
-rw-r--r--src/zload.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zload.c b/src/zload.c
index 53fae12..9e4521f 100644
--- a/src/zload.c
+++ b/src/zload.c
@@ -8,17 +8,17 @@
size_t
zload(z_t a, const void *buffer)
{
- const char *buf = buffer;
- a->sign = *((int *)buf), buf += sizeof(int);
+ const char *buf = buffer;
+ a->sign = *((int *)buf), buf += sizeof(int);
a->used = *((size_t *)buf), buf += sizeof(size_t);
- a->alloced = *((size_t *)buf), buf += sizeof(size_t);
+ a->alloced = *((size_t *)buf), buf += sizeof(size_t);
if (a->alloced) {
- a->chars = realloc(a->chars, a->alloced * sizeof(*(a->chars)));
+ a->chars = realloc(a->chars, a->alloced * sizeof(*(a->chars)));
} else {
a->chars = 0;
}
if (a->sign) {
- memcpy(a->chars, buf, a->used * sizeof(*(a->chars)));
+ memcpy(a->chars, buf, a->used * sizeof(*(a->chars)));
}
return sizeof(z_t) - sizeof(a->chars) + (a->sign ? a->used * sizeof(*(a->chars)) : 0);
}