Fix ReadOffset() to work correctly when off_t is wider than int.

This commit is contained in:
Tom Lane 2004-01-04 04:02:22 +00:00
parent 3d5c2692e7
commit 1af7b00169

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.79 2003/10/20 21:05:11 tgl Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.79.2.1 2004/01/04 04:02:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1425,7 +1425,7 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
for (off = 0; off < AH->offSize; off++)
{
if (off < sizeof(off_t))
*o |= ((*AH->ReadBytePtr) (AH)) << (off * 8);
*o |= ((off_t) ((*AH->ReadBytePtr) (AH))) << (off * 8);
else
{
if ((*AH->ReadBytePtr) (AH) != 0)