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
This commit is contained in:
parent
8cd61d288a
commit
258f48f858
8 changed files with 13 additions and 13 deletions
|
@ -420,7 +420,7 @@ g_intbig_picksplit(PG_FUNCTION_ARGS)
|
|||
if (ISALLTRUE(datum_l) || ISALLTRUE(_j))
|
||||
{
|
||||
if (!ISALLTRUE(datum_l))
|
||||
MemSet((void *) union_l, 0xff, siglen);
|
||||
memset((void *) union_l, 0xff, siglen);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -436,7 +436,7 @@ g_intbig_picksplit(PG_FUNCTION_ARGS)
|
|||
if (ISALLTRUE(datum_r) || ISALLTRUE(_j))
|
||||
{
|
||||
if (!ISALLTRUE(datum_r))
|
||||
MemSet((void *) union_r, 0xff, siglen);
|
||||
memset((void *) union_r, 0xff, siglen);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue