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

Commit06ecacd

Browse files
author
Neil Conway
committed
More trivial dead code removal: in int_to_roman(), checking for "num == -1"
is redundant after a check has already been made for "num < 0". The "set"variable can also be removed, as it is now no longer used. Per checkingwith Karel, this is the right fix.Per Coverity static analysis performed by EnterpriseDB.
1 parentebcb4c9 commit06ecacd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.88 2005/06/15 00:34:08 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.89 2005/06/22 01:43:05 neilc Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2005, PostgreSQL Global Development Group
@@ -3508,8 +3508,7 @@ static char *
35083508
int_to_roman(intnumber)
35093509
{
35103510
intlen=0,
3511-
num=0,
3512-
set=0;
3511+
num=0;
35133512
char*p=NULL,
35143513
*result,
35153514
numstr[5];
@@ -3529,9 +3528,6 @@ int_to_roman(int number)
35293528
num=*p-49;/* 48 ascii + 1 */
35303529
if (num<0)
35313530
continue;
3532-
if (num==-1&&set==0)
3533-
continue;
3534-
set=1;
35353531

35363532
if (len>3)
35373533
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp