Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e29c565

Browse filesBrowse files
committed
Remove dead code in formatting.c
Remove some code guarded by IS_MINUS() or IS_PLUS(), where the entire stanza is inside an else-block where both of these are false. This should slightly improve test coverage. While at it, remove coding that apparently assumes that unsetting a bit is so expensive that we have to first check if it's already set in the first place. Per Coverity report from Ranier Vilela Analysis and review by Justin Pryzby Discussion: https://www.postgresql.org/message-id/20221223010818.GP1153%40telsasoft.com
1 parent c981d91 commit e29c565
Copy full SHA for e29c565

File tree

Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed

‎src/backend/utils/adt/formatting.c

Copy file name to clipboardExpand all lines: src/backend/utils/adt/formatting.c
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5664,13 +5664,9 @@ NUM_processor(FormatNode *node, NUMDesc *Num, char *inout,
56645664
{
56655665
if (Np->sign != '-')
56665666
{
5667-
if (IS_BRACKET(Np->Num) && IS_FILLMODE(Np->Num))
5667+
if (IS_FILLMODE(Np->Num))
56685668
Np->Num->flag &= ~NUM_F_BRACKET;
5669-
if (IS_MINUS(Np->Num))
5670-
Np->Num->flag &= ~NUM_F_MINUS;
56715669
}
5672-
else if (Np->sign != '+' && IS_PLUS(Np->Num))
5673-
Np->Num->flag &= ~NUM_F_PLUS;
56745670

56755671
if (Np->sign == '+' && IS_FILLMODE(Np->Num) && IS_LSIGN(Np->Num) == false)
56765672
Np->sign_wrote = true; /* needn't sign */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.