diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-05-14 13:06:38 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-05-14 13:06:50 -0400 |
commit | 5cbfce562f7cd2aab0cdc4694ce298ec3567930e (patch) | |
tree | 64e722d72fc5f1803cb6f6371d6cf12863e2812f /src/common/jsonapi.c | |
parent | 1255466f8358ecac29581aa5ecec76628dc2e33c (diff) | |
download | postgresql-5cbfce562f7cd2aab0cdc4694ce298ec3567930e.tar.gz postgresql-5cbfce562f7cd2aab0cdc4694ce298ec3567930e.zip |
Initial pgindent and pgperltidy run for v13.
Includes some manual cleanup of places that pgindent messed up,
most of which weren't per project style anyway.
Notably, it seems some people didn't absorb the style rules of
commit c9d297751, because there were a bunch of new occurrences
of function calls with a newline just after the left paren, all
with faulty expectations about how the rest of the call would get
indented.
Diffstat (limited to 'src/common/jsonapi.c')
-rw-r--r-- | src/common/jsonapi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/jsonapi.c b/src/common/jsonapi.c index 7df231c3851..aa917d0fc9d 100644 --- a/src/common/jsonapi.c +++ b/src/common/jsonapi.c @@ -54,7 +54,7 @@ typedef enum /* contexts of JSON parser */ static inline JsonParseErrorType json_lex_string(JsonLexContext *lex); static inline JsonParseErrorType json_lex_number(JsonLexContext *lex, char *s, - bool *num_err, int *total_len); + bool *num_err, int *total_len); static inline JsonParseErrorType parse_scalar(JsonLexContext *lex, JsonSemAction *sem); static JsonParseErrorType parse_object_field(JsonLexContext *lex, JsonSemAction *sem); static JsonParseErrorType parse_object(JsonLexContext *lex, JsonSemAction *sem); @@ -179,7 +179,7 @@ JsonParseErrorType pg_parse_json(JsonLexContext *lex, JsonSemAction *sem) { JsonTokenType tok; - JsonParseErrorType result; + JsonParseErrorType result; /* get the initial token */ result = json_lex(lex); @@ -198,7 +198,7 @@ pg_parse_json(JsonLexContext *lex, JsonSemAction *sem) result = parse_array(lex, sem); break; default: - result = parse_scalar(lex, sem); /* json can be a bare scalar */ + result = parse_scalar(lex, sem); /* json can be a bare scalar */ } if (result == JSON_SUCCESS) @@ -220,7 +220,7 @@ json_count_array_elements(JsonLexContext *lex, int *elements) { JsonLexContext copylex; int count; - JsonParseErrorType result; + JsonParseErrorType result; /* * It's safe to do this with a shallow copy because the lexical routines @@ -252,7 +252,7 @@ json_count_array_elements(JsonLexContext *lex, int *elements) } } result = lex_expect(JSON_PARSE_ARRAY_NEXT, ©lex, - JSON_TOKEN_ARRAY_END); + JSON_TOKEN_ARRAY_END); if (result != JSON_SUCCESS) return result; @@ -527,7 +527,7 @@ json_lex(JsonLexContext *lex) { char *s; int len; - JsonParseErrorType result; + JsonParseErrorType result; /* Skip leading whitespace. */ s = lex->token_terminator; @@ -1123,8 +1123,8 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex) static char * extract_token(JsonLexContext *lex) { - int toklen = lex->token_terminator - lex->token_start; - char *token = palloc(toklen + 1); + int toklen = lex->token_terminator - lex->token_start; + char *token = palloc(toklen + 1); memcpy(token, lex->token_start, toklen); token[toklen] = '\0'; |