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

Commitab9981c

Browse files
author
Michael Meskes
committed
Removed comparison of unsigned expression < 0.
1 parentc697337 commitab9981c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.15 2009/01/01 17:23:50 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.16 2009/05/21 12:54:27 meskes Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -475,7 +475,7 @@ tsvectorrecv(PG_FUNCTION_ARGS)
475475
/* sanity checks */
476476

477477
lex_len=strlen(lexeme);
478-
if (lex_len<0||lex_len>MAXSTRLEN)
478+
if (lex_len>MAXSTRLEN)
479479
elog(ERROR,"invalid tsvector: lexeme too long");
480480

481481
if (datalen>MAXSTRPOS)

‎src/interfaces/libpq/fe-exec.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.200 2009/01/01 17:24:03 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.201 2009/05/21 12:54:27 meskes Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res)
23852385
char*
23862386
PQresStatus(ExecStatusTypestatus)
23872387
{
2388-
if (status<0||status>=sizeofpgresStatus /sizeofpgresStatus[0])
2388+
if (status >=sizeofpgresStatus /sizeofpgresStatus[0])
23892389
returnlibpq_gettext("invalid ExecStatusType code");
23902390
returnpgresStatus[status];
23912391
}

‎src/interfaces/libpq/fe-misc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Portions Copyright (c) 1994, Regents of the University of California
2424
*
2525
* IDENTIFICATION
26-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.138 2009/01/01 17:24:03 momjian Exp $
26+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.139 2009/05/21 12:54:27 meskes Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -178,7 +178,7 @@ pqPuts(const char *s, PGconn *conn)
178178
int
179179
pqGetnchar(char*s,size_tlen,PGconn*conn)
180180
{
181-
if (len<0||len> (size_t) (conn->inEnd-conn->inCursor))
181+
if (len> (size_t) (conn->inEnd-conn->inCursor))
182182
returnEOF;
183183

184184
memcpy(s,conn->inBuffer+conn->inCursor,len);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp