Commit 3b5d3721 authored by Peter Eisentraut's avatar Peter Eisentraut

pg_upgrade: Clean up some redundant code

No need to call exit() after pg_fatal().  Clean up a few stragglers
for consistency.
parent 93765bd9
...@@ -169,18 +169,12 @@ parseCommandLine(int argc, char *argv[]) ...@@ -169,18 +169,12 @@ parseCommandLine(int argc, char *argv[])
*/ */
case 'p': case 'p':
if ((old_cluster.port = atoi(optarg)) <= 0) if ((old_cluster.port = atoi(optarg)) <= 0)
{
pg_fatal("invalid old port number\n"); pg_fatal("invalid old port number\n");
exit(1);
}
break; break;
case 'P': case 'P':
if ((new_cluster.port = atoi(optarg)) <= 0) if ((new_cluster.port = atoi(optarg)) <= 0)
{
pg_fatal("invalid new port number\n"); pg_fatal("invalid new port number\n");
exit(1);
}
break; break;
case 'r': case 'r':
......
...@@ -105,11 +105,8 @@ main(int argc, char **argv) ...@@ -105,11 +105,8 @@ main(int argc, char **argv)
/* Set mask based on PGDATA permissions */ /* Set mask based on PGDATA permissions */
if (!GetDataDirectoryCreatePerm(new_cluster.pgdata)) if (!GetDataDirectoryCreatePerm(new_cluster.pgdata))
{ pg_fatal("could not read permissions of directory \"%s\": %s\n",
pg_log(PG_FATAL, "could not read permissions of directory \"%s\": %s\n",
new_cluster.pgdata, strerror(errno)); new_cluster.pgdata, strerror(errno));
exit(1);
}
umask(pg_mode_mask); umask(pg_mode_mask);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment