aboutsummaryrefslogtreecommitdiff
path: root/contrib/pg_trgm/trgm_gist.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-07-01 00:16:38 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-07-01 00:16:38 +0200
commit258f48f858b0bcc4c3fac3fa01f79ee61ad0cd1e (patch)
tree4e0cdca7b5fce474ac0bcb8c05c37b3283511a20 /contrib/pg_trgm/trgm_gist.c
parent8cd61d288adfabe1b7f83359eb0abd27382eec08 (diff)
downloadpostgresql-258f48f858b0bcc4c3fac3fa01f79ee61ad0cd1e.tar.gz
postgresql-258f48f858b0bcc4c3fac3fa01f79ee61ad0cd1e.zip
Change some unnecessary MemSet calls
MemSet() with a value other than 0 just falls back to memset(), so the indirection is unnecessary if the value is constant and not 0. Since there is some interest in getting rid of MemSet(), this gets some easy cases out of the way. (There are a few MemSet() calls that I didn't change to maintain the consistency with their surrounding code.) Discussion: https://www.postgresql.org/message-id/flat/CAEudQApCeq4JjW1BdnwU=m=-DvG5WyUik0Yfn3p6UNphiHjj+w@mail.gmail.com
Diffstat (limited to 'contrib/pg_trgm/trgm_gist.c')
-rw-r--r--contrib/pg_trgm/trgm_gist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c
index 6f28db7d1ed..7a7be807af1 100644
--- a/contrib/pg_trgm/trgm_gist.c
+++ b/contrib/pg_trgm/trgm_gist.c
@@ -914,7 +914,7 @@ gtrgm_picksplit(PG_FUNCTION_ARGS)
if (ISALLTRUE(datum_l) || cache[j].allistrue)
{
if (!ISALLTRUE(datum_l))
- MemSet((void *) GETSIGN(datum_l), 0xff, siglen);
+ memset((void *) GETSIGN(datum_l), 0xff, siglen);
}
else
{
@@ -930,7 +930,7 @@ gtrgm_picksplit(PG_FUNCTION_ARGS)
if (ISALLTRUE(datum_r) || cache[j].allistrue)
{
if (!ISALLTRUE(datum_r))
- MemSet((void *) GETSIGN(datum_r), 0xff, siglen);
+ memset((void *) GETSIGN(datum_r), 0xff, siglen);
}
else
{