diff options
author | Linus Nordberg <linus@nordu.net> | 2016-05-09 13:15:47 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-05-09 13:16:09 +0200 |
commit | baf2c8198f159bc84a711d314df4e0c1454c2a29 (patch) | |
tree | c0322b7ed3020a83c21d2d45a87df9a1568ccb44 /c_src/permdb.c | |
parent | db6acff457a68e8a645594687b789c6cb13b4f49 (diff) |
Whitespace.
More consistent indentation.
Diffstat (limited to 'c_src/permdb.c')
-rw-r--r-- | c_src/permdb.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/c_src/permdb.c b/c_src/permdb.c index 604899b..f400b42 100644 --- a/c_src/permdb.c +++ b/c_src/permdb.c @@ -491,25 +491,25 @@ permdb_free(permdb_object *state) static unsigned char keybits(const unsigned char *key, unsigned int level) { - /* Finding the proper octet in key. */ - unsigned char b = key[level/4]; - /* "Micro-level", for finding the proper two bits, below. */ - unsigned int mlev = level % 4; + /* Finding the proper octet in key. */ + unsigned char b = key[level/4]; + /* "Micro-level", for finding the proper two bits, below. */ + unsigned int mlev = level % 4; - /* Shift right and mask off the two lowest bits. */ - return (b >> (6 - 2*mlev)) & 0x3; + /* Shift right and mask off the two lowest bits. */ + return (b >> (6 - 2*mlev)) & 0x3; } static void keypart(const unsigned char *key, unsigned int level, ps_string *s) { - unsigned int i; - for (i = 0; i < level; i++) { - unsigned char b = keybits(key, i); - s->value[i] = b + (unsigned char) '0'; - } + unsigned int i; + for (i = 0; i < level; i++) { + unsigned char b = keybits(key, i); + s->value[i] = b + (unsigned char) '0'; + } - s->length = level; + s->length = level; } static void @@ -559,11 +559,11 @@ unpacknode(permdb_object *state, const unsigned char *data, size_t datalen) unsigned char * read_internal_data(permdb_object *state, node_offset offset, size_t length) { - buffered_file *file = state->datafile; - dprintf(READ, (stderr, "reading data: offset %llu\n", - (unsigned long long) offset)); + buffered_file *file = state->datafile; + dprintf(READ, (stderr, "reading data: offset %llu\n", + (unsigned long long) offset)); - return bf_read(file, offset, length, &state->error); + return bf_read(file, offset, length, &state->error); } static int |