Re: Refectoring of receivelog.c - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Refectoring of receivelog.c
Date
Msg-id CABUevEzNb0K3dB6QK5kWQDU5MCJTC7DRfA7oc=iaT5RhODmmdg@mail.gmail.com
Whole thread Raw
In response to Re: Refectoring of receivelog.c  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers


On Sun, Mar 13, 2016 at 12:15 AM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
On 03/11/2016 11:15 AM, Magnus Hagander wrote:

...


Pushed with updated comments and a named stsruct.

Pretty sure this memset call in pg_basebackup.c is incorrect, as it passes parameters in the wrong order:

    MemSet(&stream, sizeof(stream), 0);

It seems benign, because we're setting all the fields explicitly, but gcc is nagging about it.

Indeed,that's backwards. Interestingly enough I thought I did a c&p between that and the one in pg_receivexlog.c, but clearly I did not. And my gcc did not nag about it.

Fixed, thanks for the pointer!


--

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Performance improvement for joins where outer side is unique
Next
From: Magnus Hagander
Date:
Subject: Re: auto_explain sample rate