aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/zbits.c4
-rw-r--r--src/zload.c10
-rw-r--r--src/zlsb.c6
-rw-r--r--src/zsave.c6
-rw-r--r--src/zsetup.c2
5 files changed, 14 insertions, 14 deletions
diff --git a/src/zbits.c b/src/zbits.c
index 07c1591..014294e 100644
--- a/src/zbits.c
+++ b/src/zbits.c
@@ -5,8 +5,8 @@
size_t
zbits(z_t a)
{
- size_t i;
- uint32_t x;
+ size_t i;
+ uint32_t x;
if (zzero(a)) {
return 1;
}
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);
}
diff --git a/src/zlsb.c b/src/zlsb.c
index 610b32f..2952a05 100644
--- a/src/zlsb.c
+++ b/src/zlsb.c
@@ -5,15 +5,15 @@
size_t
zlsb(z_t a)
{
- size_t i = 0;
- uint32_t x;
+ size_t i = 0;
+ uint32_t x;
if (zzero(a)) {
return SIZE_MAX;
}
for (;; i++) {
x = a->chars[i];
if (x) {
- x = ~x;
+ x = ~x;
for (i *= BITS_PER_CHAR; x & 1; x >>= 1, i++);
return i;
}
diff --git a/src/zsave.c b/src/zsave.c
index b312307..6f68387 100644
--- a/src/zsave.c
+++ b/src/zsave.c
@@ -9,9 +9,9 @@ zsave(z_t a, void *buffer)
{
if (buffer) {
char *buf = buffer;
- *((int *)buf) = a->sign, buf += sizeof(int);
- *((size_t *)buf) = a->used, buf += sizeof(size_t);
- *((size_t *)buf) = a->alloced, buf += sizeof(size_t);
+ *((int *)buf) = a->sign, buf += sizeof(int);
+ *((size_t *)buf) = a->used, buf += sizeof(size_t);
+ *((size_t *)buf) = a->alloced, buf += sizeof(size_t);
if (a->sign) {
memcpy(buf, a->chars, a->used * sizeof(*(a->chars)));
}
diff --git a/src/zsetup.c b/src/zsetup.c
index 626d6f6..2aadbba 100644
--- a/src/zsetup.c
+++ b/src/zsetup.c
@@ -12,7 +12,7 @@ int libzahl_set_up = 0;
void
zsetup(jmp_buf env)
{
- libzahl_jmp_buf = jmp_buf;
+ libzahl_jmp_buf = jmp_buf;
if (!libzahl_set_up) {
libzahl_set_up = 1;