Fix indentation
No functional changes.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
13
src/load.c
13
src/load.c
@@ -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 '[':
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user