Reassign variable value in XLogReadRecord

Started by Dickson S. Guedesalmost 13 years ago2 messages
#1Dickson S. Guedes
listas@guedesoft.net

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; <=== assign
uint32 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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Robert Haas
robertmhaas@gmail.com
In reply to: Dickson S. Guedes (#1)
Re: Reassign variable value in XLogReadRecord

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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers