Re: remove redundant memset() call

2022-10-13 Thread Daniel Gustafsson
> On 13 Oct 2022, at 21:59, Bruce Momjian wrote: > > On Thu, Oct 13, 2022 at 09:40:42PM +0200, Daniel Gustafsson wrote: >>> On 13 Oct 2022, at 21:18, Nathan Bossart wrote: >>> >>> On Thu, Oct 13, 2022 at 03:15:13PM -0400, Bruce Momjian wrote: On Thu, Oct 13, 2022 at 12:12:35PM -0700,

Re: remove redundant memset() call

2022-10-13 Thread Bruce Momjian
On Thu, Oct 13, 2022 at 09:40:42PM +0200, Daniel Gustafsson wrote: > > On 13 Oct 2022, at 21:18, Nathan Bossart wrote: > > > > On Thu, Oct 13, 2022 at 03:15:13PM -0400, Bruce Momjian wrote: > >> On Thu, Oct 13, 2022 at 12:12:35PM -0700, Zhihong Yu wrote: > >>> the memory has been zero'ed out by

Re: remove redundant memset() call

2022-10-13 Thread Daniel Gustafsson
> On 13 Oct 2022, at 21:18, Nathan Bossart wrote: > > On Thu, Oct 13, 2022 at 03:15:13PM -0400, Bruce Momjian wrote: >> On Thu, Oct 13, 2022 at 12:12:35PM -0700, Zhihong Yu wrote: >>> the memory has been zero'ed out by palloc0(). >>> >>> memcpy is not relevant w.r.t. resetting memory. >> >>

Re: remove redundant memset() call

2022-10-13 Thread Nathan Bossart
On Thu, Oct 13, 2022 at 03:15:13PM -0400, Bruce Momjian wrote: > On Thu, Oct 13, 2022 at 12:12:35PM -0700, Zhihong Yu wrote: >> the memory has been zero'ed out by palloc0(). >> >> memcpy is not relevant w.r.t. resetting memory. > > Ah, good point. Yeah, it looks like this was missed in ca7f8e2.

Re: remove redundant memset() call

2022-10-13 Thread Bruce Momjian
On Thu, Oct 13, 2022 at 12:12:35PM -0700, Zhihong Yu wrote: > On Thu, Oct 13, 2022 at 12:10 PM Bruce Momjian wrote: > > On Thu, Oct 13, 2022 at 10:55:08AM -0700, Zhihong Yu wrote: > > Hi, > > I was looking at combo_init in contrib/pgcrypto/px.c . > > > > There is a memset()

Re: remove redundant memset() call

2022-10-13 Thread Zhihong Yu
On Thu, Oct 13, 2022 at 12:10 PM Bruce Momjian wrote: > On Thu, Oct 13, 2022 at 10:55:08AM -0700, Zhihong Yu wrote: > > Hi, > > I was looking at combo_init in contrib/pgcrypto/px.c . > > > > There is a memset() call following palloc0() - the call is redundant. > > > > Please see the patch for

Re: remove redundant memset() call

2022-10-13 Thread Bruce Momjian
On Thu, Oct 13, 2022 at 10:55:08AM -0700, Zhihong Yu wrote: > Hi, > I was looking at combo_init in contrib/pgcrypto/px.c . > > There is a memset() call following palloc0() - the call is redundant. > > Please see the patch for the proposed change. > > Thanks > diff --git a/contrib/pgcrypto/px.c

remove redundant memset() call

2022-10-13 Thread Zhihong Yu
Hi, I was looking at combo_init in contrib/pgcrypto/px.c . There is a memset() call following palloc0() - the call is redundant. Please see the patch for the proposed change. Thanks remove-redundant-memset-call.patch Description: Binary data