Skip to content

Commit 3b0ee7f

Browse files
committed
Ensure that length argument of memcmp() isn't seen as negative.
I think this will shut up a weird warning from buildfarm member serinus. Perhaps it'd be better to change tsCompareString's length arguments to unsigned, but that seems more invasive than is justified. Part of a general push to remove off-the-beaten-track warnings where we can easily do so.
1 parent 4c1a1a3 commit 3b0ee7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/tsvector_op.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
11671167
}
11681168
else
11691169
{
1170-
cmp = memcmp(a, b, Min(lena, lenb));
1170+
cmp = memcmp(a, b, Min((unsigned int) lena, (unsigned int) lenb));
11711171

11721172
if (prefix)
11731173
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy