Thread: Reassign variable value in XLogReadRecord

Reassign variable value in XLogReadRecord

From
"Dickson S. Guedes"
Date:
Hello,

While walking in the code I see the following code in
src/backend/access/transam/xlogreader.c:177-191

XLogRecord *
XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg)
{XLogRecord *record;XLogRecPtr    targetPagePtr;bool        randAccess = false;  <=== assignuint32        len,
 total_len;uint32        targetRecOff;uint32        pageHeaderSize;bool        gotheader;int            readOff;
 
randAccess = false;  <== reassign/* reset error state */


Do I am missing something or the last one is unnecessary?

Best regards.
-- 
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://github.com/guedes - http://guedesoft.net
http://www.postgresql.org.br



Re: Reassign variable value in XLogReadRecord

From
Robert Haas
Date:
On Mon, Apr 8, 2013 at 9:31 PM, Dickson S. Guedes <listas@guedesoft.net> wrote:
> Do I am missing something or the last one is unnecessary?

Looks unnecessary to me, too.  Removed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company