aboutsummaryrefslogtreecommitdiffstats
path: root/src/zload.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-01 18:42:43 +0100
committerMattias Andrée <maandree@kth.se>2016-03-01 18:42:43 +0100
commitd703af0b0afa6eafefe95b56b4073c3a16c46be3 (patch)
tree631297d30c198e7636c5e03e2d02330b28863fbf /src/zload.c
parentAdd zsetup, zunsetup, zinit, zfree, zswap, zsave, zload, zbits, and zlsb (diff)
downloadlibzahl-d703af0b0afa6eafefe95b56b4073c3a16c46be3.tar.gz
libzahl-d703af0b0afa6eafefe95b56b4073c3a16c46be3.tar.bz2
libzahl-d703af0b0afa6eafefe95b56b4073c3a16c46be3.tar.xz
Fix whitespace
Signed-off-by: Mattias Andrée <maandree@kth.se>
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);
}