v1-0006-formatting.c-cleanup-Remove-unnecessary-extra-par.patch

text/plain

Filename: v1-0006-formatting.c-cleanup-Remove-unnecessary-extra-par.patch
Type: text/plain
Part: 5
Message: formatting.c cleanup

Patch

Format: format-patch
Series: patch v1-0006
Subject: formatting.c cleanup: Remove unnecessary extra parentheses
File+
src/backend/utils/adt/formatting.c 2 2
From 26970c5c4e0781305968b206261b38605afe9888 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Mon, 20 Oct 2025 08:16:03 +0200
Subject: [PATCH v1 06/13] formatting.c cleanup: Remove unnecessary extra
 parentheses

---
 src/backend/utils/adt/formatting.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 0671acf2874..1a40463023c 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)
-- 
2.51.0