Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
5aa446c9
Commit
5aa446c9
authored
Nov 14, 2010
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup various comparisons with the constant "true".
Itagaki Takahiro, with slight modifications.
parent
3892a2d8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
20 additions
and
20 deletions
+20
-20
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/pg_upgrade.c
+1
-1
src/backend/access/gin/ginget.c
src/backend/access/gin/ginget.c
+1
-1
src/backend/access/gist/gistproc.c
src/backend/access/gist/gistproc.c
+6
-6
src/backend/commands/sequence.c
src/backend/commands/sequence.c
+1
-1
src/backend/tsearch/regis.c
src/backend/tsearch/regis.c
+2
-2
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/geo_ops.c
+2
-2
src/backend/utils/adt/tsrank.c
src/backend/utils/adt/tsrank.c
+1
-1
src/backend/utils/adt/tsvector_op.c
src/backend/utils/adt/tsvector_op.c
+1
-1
src/bin/psql/print.c
src/bin/psql/print.c
+2
-2
src/interfaces/ecpg/ecpglib/connect.c
src/interfaces/ecpg/ecpglib/connect.c
+2
-2
src/interfaces/ecpg/preproc/ecpg.addons
src/interfaces/ecpg/preproc/ecpg.addons
+1
-1
No files found.
contrib/pg_upgrade/pg_upgrade.c
View file @
5aa446c9
...
@@ -254,7 +254,7 @@ copy_clog_xlog_xid(void)
...
@@ -254,7 +254,7 @@ copy_clog_xlog_xid(void)
snprintf
(
old_clog_path
,
sizeof
(
old_clog_path
),
"%s/pg_clog"
,
old_cluster
.
pgdata
);
snprintf
(
old_clog_path
,
sizeof
(
old_clog_path
),
"%s/pg_clog"
,
old_cluster
.
pgdata
);
snprintf
(
new_clog_path
,
sizeof
(
new_clog_path
),
"%s/pg_clog"
,
new_cluster
.
pgdata
);
snprintf
(
new_clog_path
,
sizeof
(
new_clog_path
),
"%s/pg_clog"
,
new_cluster
.
pgdata
);
if
(
rmtree
(
new_clog_path
,
true
)
!=
true
)
if
(
!
rmtree
(
new_clog_path
,
true
)
)
pg_log
(
PG_FATAL
,
"Unable to delete directory %s
\n
"
,
new_clog_path
);
pg_log
(
PG_FATAL
,
"Unable to delete directory %s
\n
"
,
new_clog_path
);
check_ok
();
check_ok
();
...
...
src/backend/access/gin/ginget.c
View file @
5aa446c9
...
@@ -1361,7 +1361,7 @@ scanGetItem(IndexScanDesc scan, ItemPointer advancePast,
...
@@ -1361,7 +1361,7 @@ scanGetItem(IndexScanDesc scan, ItemPointer advancePast,
}
}
#define GinIsNewKey(s) ( ((GinScanOpaque) scan->opaque)->keys == NULL )
#define GinIsNewKey(s) ( ((GinScanOpaque) scan->opaque)->keys == NULL )
#define GinIsVoidRes(s) ( ((GinScanOpaque) scan->opaque)->isVoidRes
== true
)
#define GinIsVoidRes(s) ( ((GinScanOpaque) scan->opaque)->isVoidRes )
Datum
Datum
gingetbitmap
(
PG_FUNCTION_ARGS
)
gingetbitmap
(
PG_FUNCTION_ARGS
)
...
...
src/backend/access/gist/gistproc.c
View file @
5aa446c9
...
@@ -380,12 +380,12 @@ gist_box_picksplit(PG_FUNCTION_ARGS)
...
@@ -380,12 +380,12 @@ gist_box_picksplit(PG_FUNCTION_ARGS)
for
(
i
=
OffsetNumberNext
(
FirstOffsetNumber
);
i
<=
maxoff
;
i
=
OffsetNumberNext
(
i
))
for
(
i
=
OffsetNumberNext
(
FirstOffsetNumber
);
i
<=
maxoff
;
i
=
OffsetNumberNext
(
i
))
{
{
cur
=
DatumGetBoxP
(
entryvec
->
vector
[
i
].
key
);
cur
=
DatumGetBoxP
(
entryvec
->
vector
[
i
].
key
);
if
(
allisequal
==
true
&&
(
if
(
allisequal
&&
(
pageunion
.
high
.
x
!=
cur
->
high
.
x
||
pageunion
.
high
.
x
!=
cur
->
high
.
x
||
pageunion
.
high
.
y
!=
cur
->
high
.
y
||
pageunion
.
high
.
y
!=
cur
->
high
.
y
||
pageunion
.
low
.
x
!=
cur
->
low
.
x
||
pageunion
.
low
.
x
!=
cur
->
low
.
x
||
pageunion
.
low
.
y
!=
cur
->
low
.
y
pageunion
.
low
.
y
!=
cur
->
low
.
y
))
))
allisequal
=
false
;
allisequal
=
false
;
adjustBox
(
&
pageunion
,
cur
);
adjustBox
(
&
pageunion
,
cur
);
...
...
src/backend/commands/sequence.c
View file @
5aa446c9
...
@@ -1104,7 +1104,7 @@ init_params(List *options, bool isInit,
...
@@ -1104,7 +1104,7 @@ init_params(List *options, bool isInit,
if
(
is_cycled
!=
NULL
)
if
(
is_cycled
!=
NULL
)
{
{
new
->
is_cycled
=
intVal
(
is_cycled
->
arg
);
new
->
is_cycled
=
intVal
(
is_cycled
->
arg
);
Assert
(
new
->
is_cycled
==
false
||
new
->
is_cycled
==
true
);
Assert
(
BoolIsValid
(
new
->
is_cycled
)
);
}
}
else
if
(
isInit
)
else
if
(
isInit
)
new
->
is_cycled
=
false
;
new
->
is_cycled
=
false
;
...
...
src/backend/tsearch/regis.c
View file @
5aa446c9
...
@@ -244,11 +244,11 @@ RS_execute(Regis *r, char *str)
...
@@ -244,11 +244,11 @@ RS_execute(Regis *r, char *str)
switch
(
ptr
->
type
)
switch
(
ptr
->
type
)
{
{
case
RSF_ONEOF
:
case
RSF_ONEOF
:
if
(
mb_strchr
((
char
*
)
ptr
->
data
,
c
)
!=
true
)
if
(
!
mb_strchr
((
char
*
)
ptr
->
data
,
c
)
)
return
false
;
return
false
;
break
;
break
;
case
RSF_NONEOF
:
case
RSF_NONEOF
:
if
(
mb_strchr
((
char
*
)
ptr
->
data
,
c
)
==
true
)
if
(
mb_strchr
((
char
*
)
ptr
->
data
,
c
))
return
false
;
return
false
;
break
;
break
;
default:
default:
...
...
src/backend/utils/adt/geo_ops.c
View file @
5aa446c9
...
@@ -3903,7 +3903,7 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
...
@@ -3903,7 +3903,7 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
t
.
p
[
1
]
=
*
b
;
t
.
p
[
1
]
=
*
b
;
s
.
p
[
0
]
=
poly
->
p
[(
start
==
0
)
?
(
poly
->
npts
-
1
)
:
(
start
-
1
)];
s
.
p
[
0
]
=
poly
->
p
[(
start
==
0
)
?
(
poly
->
npts
-
1
)
:
(
start
-
1
)];
for
(
i
=
start
;
i
<
poly
->
npts
&&
res
==
true
;
i
++
)
for
(
i
=
start
;
i
<
poly
->
npts
&&
res
;
i
++
)
{
{
Point
*
interpt
;
Point
*
interpt
;
...
@@ -3979,7 +3979,7 @@ poly_contain(PG_FUNCTION_ARGS)
...
@@ -3979,7 +3979,7 @@ poly_contain(PG_FUNCTION_ARGS)
s
.
p
[
0
]
=
polyb
->
p
[
polyb
->
npts
-
1
];
s
.
p
[
0
]
=
polyb
->
p
[
polyb
->
npts
-
1
];
result
=
true
;
result
=
true
;
for
(
i
=
0
;
i
<
polyb
->
npts
&&
result
==
true
;
i
++
)
for
(
i
=
0
;
i
<
polyb
->
npts
&&
result
;
i
++
)
{
{
s
.
p
[
1
]
=
polyb
->
p
[
i
];
s
.
p
[
1
]
=
polyb
->
p
[
i
];
result
=
lseg_inside_poly
(
s
.
p
,
s
.
p
+
1
,
polya
,
0
);
result
=
lseg_inside_poly
(
s
.
p
,
s
.
p
+
1
,
polya
,
0
);
...
...
src/backend/utils/adt/tsrank.c
View file @
5aa446c9
...
@@ -109,7 +109,7 @@ find_wordentry(TSVector t, TSQuery q, QueryOperand *item, int32 *nitem)
...
@@ -109,7 +109,7 @@ find_wordentry(TSVector t, TSQuery q, QueryOperand *item, int32 *nitem)
StopHigh
=
StopMiddle
;
StopHigh
=
StopMiddle
;
}
}
if
(
item
->
prefix
==
true
)
if
(
item
->
prefix
)
{
{
if
(
StopLow
>=
StopHigh
)
if
(
StopLow
>=
StopHigh
)
StopMiddle
=
StopHigh
;
StopMiddle
=
StopHigh
;
...
...
src/backend/utils/adt/tsvector_op.c
View file @
5aa446c9
...
@@ -625,7 +625,7 @@ checkcondition_str(void *checkval, QueryOperand *val)
...
@@ -625,7 +625,7 @@ checkcondition_str(void *checkval, QueryOperand *val)
StopHigh
=
StopMiddle
;
StopHigh
=
StopMiddle
;
}
}
if
(
res
==
false
&&
val
->
prefix
==
true
)
if
(
!
res
&&
val
->
prefix
)
{
{
/*
/*
* there was a failed exact search, so we should scan further to find
* there was a failed exact search, so we should scan further to find
...
...
src/bin/psql/print.c
View file @
5aa446c9
...
@@ -808,7 +808,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
...
@@ -808,7 +808,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
unsigned
int
nbspace
;
unsigned
int
nbspace
;
if
(
opt_border
!=
0
||
if
(
opt_border
!=
0
||
(
format
->
wrap_right_border
==
false
&&
i
>
0
))
(
!
format
->
wrap_right_border
&&
i
>
0
))
fputs
(
curr_nl_line
?
format
->
header_nl_left
:
" "
,
fputs
(
curr_nl_line
?
format
->
header_nl_left
:
" "
,
fout
);
fout
);
...
@@ -829,7 +829,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
...
@@ -829,7 +829,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
else
else
fprintf
(
fout
,
"%*s"
,
width_wrap
[
i
],
""
);
fprintf
(
fout
,
"%*s"
,
width_wrap
[
i
],
""
);
if
(
opt_border
!=
0
||
format
->
wrap_right_border
==
true
)
if
(
opt_border
!=
0
||
format
->
wrap_right_border
)
fputs
(
!
header_done
[
i
]
?
format
->
header_nl_right
:
" "
,
fputs
(
!
header_done
[
i
]
?
format
->
header_nl_right
:
" "
,
fout
);
fout
);
...
...
src/interfaces/ecpg/ecpglib/connect.c
View file @
5aa446c9
...
@@ -165,7 +165,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
...
@@ -165,7 +165,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
ecpg_log
(
"ECPGsetcommit on line %d: action
\"
%s
\"
; connection
\"
%s
\"\n
"
,
lineno
,
mode
,
con
->
name
);
ecpg_log
(
"ECPGsetcommit on line %d: action
\"
%s
\"
; connection
\"
%s
\"\n
"
,
lineno
,
mode
,
con
->
name
);
if
(
con
->
autocommit
==
true
&&
strncmp
(
mode
,
"off"
,
strlen
(
"off"
))
==
0
)
if
(
con
->
autocommit
&&
strncmp
(
mode
,
"off"
,
strlen
(
"off"
))
==
0
)
{
{
if
(
PQtransactionStatus
(
con
->
connection
)
==
PQTRANS_IDLE
)
if
(
PQtransactionStatus
(
con
->
connection
)
==
PQTRANS_IDLE
)
{
{
...
@@ -176,7 +176,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
...
@@ -176,7 +176,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
}
}
con
->
autocommit
=
false
;
con
->
autocommit
=
false
;
}
}
else
if
(
con
->
autocommit
==
false
&&
strncmp
(
mode
,
"on"
,
strlen
(
"on"
))
==
0
)
else
if
(
!
con
->
autocommit
&&
strncmp
(
mode
,
"on"
,
strlen
(
"on"
))
==
0
)
{
{
if
(
PQtransactionStatus
(
con
->
connection
)
!=
PQTRANS_IDLE
)
if
(
PQtransactionStatus
(
con
->
connection
)
!=
PQTRANS_IDLE
)
{
{
...
...
src/interfaces/ecpg/preproc/ecpg.addons
View file @
5aa446c9
...
@@ -353,7 +353,7 @@ ECPG: ClosePortalStmtCLOSEcursor_name block
...
@@ -353,7 +353,7 @@ ECPG: ClosePortalStmtCLOSEcursor_name block
}
}
ECPG: opt_hold block
ECPG: opt_hold block
{
{
if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit
== true
)
if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit)
$$ = make_str("with hold");
$$ = make_str("with hold");
else
else
$$ = EMPTY;
$$ = EMPTY;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment