Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commite29c565

Browse files
committed
Remove dead code in formatting.c
Remove some code guarded by IS_MINUS() or IS_PLUS(), where the entirestanza is inside an else-block where both of these are false. Thisshould slightly improve test coverage.While at it, remove coding that apparently assumes that unsetting abit is so expensive that we have to first check if it's already setin the first place.Per Coverity report from Ranier VilelaAnalysis and review by Justin PryzbyDiscussion:https://www.postgresql.org/message-id/20221223010818.GP1153%40telsasoft.com
1 parentc981d91 commite29c565

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines 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-
elseif (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)

[8]ページ先頭

©2009-2025 Movatter.jp