summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Adams2011-03-28 06:09:42 +0000
committerJoey Adams2011-03-28 14:51:34 +0000
commit0a77d0c339bd7490ec54a3abeeccd7fdc0fdd1f7 (patch)
treec5621d39c0aed698f82186f559a83941b113a66b
parent01875fe5699df006a7cc9474e0ef1579817c8d5c (diff)
[cleanup] Removed Egyptian brackets from a few places
-rw-r--r--json.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/json.c b/json.c
index 70f55e4..562ea64 100644
--- a/json.c
+++ b/json.c
@@ -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);
}