diff options
| author | Peter Eisentraut <peter@eisentraut.org> | 2025-10-29 09:27:59 +0100 |
|---|---|---|
| committer | Peter Eisentraut <peter@eisentraut.org> | 2025-10-29 09:29:00 +0100 |
| commit | 2724830929ba29a5cf95fba6134ca4dcbfdb4109 (patch) | |
| tree | d7841fe3a0800837b0061b9d3210724913514513 /src | |
| parent | 6271d9922e040e457b58eedcfa60839146951243 (diff) | |
formatting.c cleanup: Remove unnecessary extra parentheses
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/6dd9d208-a3ed-49b5-b03d-8617261da973%40eisentraut.org
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/utils/adt/formatting.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index cda7b2cb37c..85418d73198 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1200,7 +1200,7 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) break; case NUM_B: - if (num->pre == 0 && num->post == 0 && (!IS_ZERO(num))) + if (num->pre == 0 && num->post == 0 && !IS_ZERO(num)) num->flag |= NUM_F_BLANK; break; @@ -1541,7 +1541,7 @@ get_th(const char *num, int type) * All "teens" (<x>1[0-9]) get 'TH/th', while <x>[02-9][123] still get * 'ST/st', 'ND/nd', 'RD/rd', respectively */ - if ((len > 1) && (num[len - 2] == '1')) + if (len > 1 && num[len - 2] == '1') last = 0; switch (last) |
