/* sanity checks */
lex_len = strlen(lexeme);
- if (lex_len < 0 || lex_len > MAXSTRLEN)
+ if (lex_len > MAXSTRLEN)
elog(ERROR, "invalid tsvector: lexeme too long");
if (datalen > MAXSTRPOS)
char *
PQresStatus(ExecStatusType status)
{
- if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
+ if (status >= sizeof pgresStatus / sizeof pgresStatus[0])
return libpq_gettext("invalid ExecStatusType code");
return pgresStatus[status];
}
int
pqGetnchar(char *s, size_t len, PGconn *conn)
{
- if (len < 0 || len > (size_t) (conn->inEnd - conn->inCursor))
+ if (len > (size_t) (conn->inEnd - conn->inCursor))
return EOF;
memcpy(s, conn->inBuffer + conn->inCursor, len);