diff options
author | Petri Lehtinen <petri@digip.org> | 2009-10-16 21:20:38 +0300 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2009-10-16 21:20:38 +0300 |
commit | 86dc1d629b3ac74e5e9b65cbcb5ca53e1d15b698 (patch) | |
tree | d2cb50eb26d127063ae6f96dc43cac29b426cefc /src | |
parent | b67e130fda46fb258ac9c974b73cd6f8c70665dc (diff) | |
download | jansson-86dc1d629b3ac74e5e9b65cbcb5ca53e1d15b698.zip jansson-86dc1d629b3ac74e5e9b65cbcb5ca53e1d15b698.tar.gz jansson-86dc1d629b3ac74e5e9b65cbcb5ca53e1d15b698.tar.bz2 |
Fix indentation
No functional changes.
Diffstat (limited to 'src')
-rw-r--r-- | src/dump.c | 2 | ||||
-rw-r--r-- | src/hashtable.h | 4 | ||||
-rw-r--r-- | src/load.c | 13 | ||||
-rw-r--r-- | src/value.c | 8 |
4 files changed, 14 insertions, 13 deletions
@@ -263,7 +263,7 @@ char *json_dumps(const json_t *json, unsigned long flags) return NULL; if(strbuffer_init(&strbuff)) - return NULL; + return NULL; if(do_dump(json, flags, 0, dump_to_strbuffer, (void *)&strbuff)) { strbuffer_close(&strbuff); diff --git a/src/hashtable.h b/src/hashtable.h index d01b7e7..81a0af5 100644 --- a/src/hashtable.h +++ b/src/hashtable.h @@ -13,8 +13,8 @@ typedef int (*key_cmp_fn)(const void *key1, const void *key2); typedef void (*free_fn)(void *key); struct hashtable_list { - struct hashtable_list *prev; - struct hashtable_list *next; + struct hashtable_list *prev; + struct hashtable_list *next; }; struct hashtable_pair { @@ -338,9 +338,10 @@ static void lex_scan_string(lex_t *lex, json_error_t *error) if(0xDC00 <= value2 && value2 <= 0xDFFF) { /* valid second surrogate */ - value = ((value - 0xD800) << 10) + - (value2 - 0xDC00) + - 0x10000; + value = + ((value - 0xD800) << 10) + + (value2 - 0xDC00) + + 0x10000; } else { /* invalid second surrogate */ @@ -505,8 +506,8 @@ static int lex_scan(lex_t *lex, json_error_t *error) strbuffer_clear(&lex->saved_text); if(lex->token == TOKEN_STRING) { - free(lex->value.string); - lex->value.string = NULL; + free(lex->value.string); + lex->value.string = NULL; } c = lex_get(lex, error); @@ -744,7 +745,7 @@ static json_t *parse_value(lex_t *lex, json_error_t *error) break; case '{': - json = parse_object(lex, error); + json = parse_object(lex, error); break; case '[': diff --git a/src/value.c b/src/value.c index 1982b90..6497f85 100644 --- a/src/value.c +++ b/src/value.c @@ -229,7 +229,7 @@ json_t *json_array(void) { json_array_t *array = malloc(sizeof(json_array_t)); if(!array) - return NULL; + return NULL; json_init(&array->json, JSON_ARRAY); array->entries = 0; @@ -480,7 +480,7 @@ json_t *json_string_nocheck(const char *value) string = malloc(sizeof(json_string_t)); if(!string) - return NULL; + return NULL; json_init(&string->json, JSON_STRING); string->value = strdup(value); @@ -540,7 +540,7 @@ json_t *json_integer(int value) { json_integer_t *integer = malloc(sizeof(json_integer_t)); if(!integer) - return NULL; + return NULL; json_init(&integer->json, JSON_INTEGER); integer->value = value; @@ -577,7 +577,7 @@ json_t *json_real(double value) { json_real_t *real = malloc(sizeof(json_real_t)); if(!real) - return NULL; + return NULL; json_init(&real->json, JSON_REAL); real->value = value; |