diff options
author | Joey Adams | 2011-03-28 06:09:42 +0000 |
---|---|---|
committer | Joey Adams | 2011-03-28 14:51:34 +0000 |
commit | 0a77d0c339bd7490ec54a3abeeccd7fdc0fdd1f7 (patch) | |
tree | c5621d39c0aed698f82186f559a83941b113a66b | |
parent | 01875fe5699df006a7cc9474e0ef1579817c8d5c (diff) |
[cleanup] Removed Egyptian brackets from a few places
-rw-r--r-- | json.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -161,11 +161,14 @@ static const char *expect_space(const char *s, const char *e); (s)++; \ } while (0) #define skip1_cond(s, e, cond) do { \ - if (next_char_cond(s, e, cond)) { \ + if (next_char_cond(s, e, cond)) \ + { \ (s)++; \ while (next_char_cond(s, e, cond)) \ (s)++; \ - } else { \ + } \ + else \ + { \ (s) = NULL; \ } \ } while (0) @@ -558,7 +561,8 @@ append_indent(StringInfo buf, const char *space, size_t space_length, int indent JsonType json_get_type(int c) { - switch (c) { + switch (c) + { case 'n': return JSON_NULL; case '"': @@ -780,7 +784,8 @@ expect_string(const char *s, const char *e) { int i; - for (i = 0; i < 4; i++) { + for (i = 0; i < 4; i++) + { c = pop_char(s, e); if (!is_hex_digit(c)) return NULL; @@ -806,7 +811,8 @@ expect_number(const char *s, const char *e) if (optional_char(s, e, '.')) skip1_pred(s, e, is_digit); - if (optional_char_cond(s, e, *s == 'E' || *s == 'e')) { + if (optional_char_cond(s, e, *s == 'E' || *s == 'e')) + { optional_char_cond(s, e, *s == '+' || *s == '-'); skip1_pred(s, e, is_digit); } |