aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2014-02-09 18:28:14 -0500
committerStephen Frost <sfrost@snowman.net>2014-02-09 18:28:14 -0500
commitdfb1e9bdc0d0a506899b11038c7fce9631cac9fe (patch)
tree0a99ee38ef25b3313435b24b88d2892f0102980f /src/bin/pg_dump/pg_backup_archiver.c
parent5e8e794e3be9fbeddf6f2e2c0515dd0f04c784ec (diff)
downloadpostgresql-dfb1e9bdc0d0a506899b11038c7fce9631cac9fe.tar.gz
postgresql-dfb1e9bdc0d0a506899b11038c7fce9631cac9fe.zip
Further pg_dump / ftello improvements
Make ftello error-checking consistent to all calls and remove a bit of ftello-related code which has been #if 0'd out since 2001. Note that we are not concerned with the ftello() call under snprintf() failing as it is just building a string to call exit_horribly() with; printing -1 in such a case is fine.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 8ea40ea7b76..2b36e455335 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -3347,9 +3347,8 @@ checkSeek(FILE *fp)
#endif
/* Check that ftello works on this file */
- errno = 0;
tpos = ftello(fp);
- if (errno)
+ if (tpos < 0)
return false;
/*