diff options
author | Robert Haas <rhaas@postgresql.org> | 2010-11-14 21:03:48 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2010-11-14 21:03:48 -0500 |
commit | 5aa446c961a6fdf15ff9c398751efd6ecff0c64a (patch) | |
tree | ac22ab29014d718cb234f2edc334c7803b3593a7 /src/backend/utils | |
parent | 3892a2d8619ee5623fc3ebee775538fdea1f529e (diff) | |
download | postgresql-5aa446c961a6fdf15ff9c398751efd6ecff0c64a.tar.gz postgresql-5aa446c961a6fdf15ff9c398751efd6ecff0c64a.zip |
Cleanup various comparisons with the constant "true".
Itagaki Takahiro, with slight modifications.
Diffstat (limited to 'src/backend/utils')
-rw-r--r-- | src/backend/utils/adt/geo_ops.c | 4 | ||||
-rw-r--r-- | src/backend/utils/adt/tsrank.c | 2 | ||||
-rw-r--r-- | src/backend/utils/adt/tsvector_op.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index 8a99df1356c..006023a07ec 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -3903,7 +3903,7 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start) t.p[1] = *b; 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; @@ -3979,7 +3979,7 @@ poly_contain(PG_FUNCTION_ARGS) s.p[0] = polyb->p[polyb->npts - 1]; 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]; result = lseg_inside_poly(s.p, s.p + 1, polya, 0); diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index b0417de1262..4b9e9383298 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -109,7 +109,7 @@ find_wordentry(TSVector t, TSQuery q, QueryOperand *item, int32 *nitem) StopHigh = StopMiddle; } - if (item->prefix == true) + if (item->prefix) { if (StopLow >= StopHigh) StopMiddle = StopHigh; diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index 769509772a1..1920f2ad267 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -625,7 +625,7 @@ checkcondition_str(void *checkval, QueryOperand *val) 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 |