aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-10-10 10:51:11 +0200
committerPeter Eisentraut <peter@eisentraut.org>2019-10-10 10:51:11 +0200
commit3b5d3721c25ed1270832265c5475649c3baa0e26 (patch)
tree130f1c8fc58c4d41ea6e429f86f957f78586163d /src
parent93765bd956bea26206043de8cbb0ae4b67e4df15 (diff)
downloadpostgresql-3b5d3721c25ed1270832265c5475649c3baa0e26.tar.gz
postgresql-3b5d3721c25ed1270832265c5475649c3baa0e26.zip
pg_upgrade: Clean up some redundant code
No need to call exit() after pg_fatal(). Clean up a few stragglers for consistency.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/option.c6
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.c7
2 files changed, 2 insertions, 11 deletions
diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c
index 28ff4c48ed3..da9e1da78db 100644
--- a/src/bin/pg_upgrade/option.c
+++ b/src/bin/pg_upgrade/option.c
@@ -169,18 +169,12 @@ parseCommandLine(int argc, char *argv[])
*/
case 'p':
if ((old_cluster.port = atoi(optarg)) <= 0)
- {
pg_fatal("invalid old port number\n");
- exit(1);
- }
break;
case 'P':
if ((new_cluster.port = atoi(optarg)) <= 0)
- {
pg_fatal("invalid new port number\n");
- exit(1);
- }
break;
case 'r':
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 5e617e97c0f..5b82e0c79bd 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -105,11 +105,8 @@ main(int argc, char **argv)
/* Set mask based on PGDATA permissions */
if (!GetDataDirectoryCreatePerm(new_cluster.pgdata))
- {
- pg_log(PG_FATAL, "could not read permissions of directory \"%s\": %s\n",
- new_cluster.pgdata, strerror(errno));
- exit(1);
- }
+ pg_fatal("could not read permissions of directory \"%s\": %s\n",
+ new_cluster.pgdata, strerror(errno));
umask(pg_mode_mask);