Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b5d372

Browse files
committed
pg_upgrade: Clean up some redundant code
No need to call exit() after pg_fatal(). Clean up a few stragglersfor consistency.
1 parent93765bd commit3b5d372

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

‎src/bin/pg_upgrade/option.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,12 @@ parseCommandLine(int argc, char *argv[])
169169
*/
170170
case'p':
171171
if ((old_cluster.port=atoi(optarg)) <=0)
172-
{
173172
pg_fatal("invalid old port number\n");
174-
exit(1);
175-
}
176173
break;
177174

178175
case'P':
179176
if ((new_cluster.port=atoi(optarg)) <=0)
180-
{
181177
pg_fatal("invalid new port number\n");
182-
exit(1);
183-
}
184178
break;
185179

186180
case'r':

‎src/bin/pg_upgrade/pg_upgrade.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,8 @@ main(int argc, char **argv)
105105

106106
/* Set mask based on PGDATA permissions */
107107
if (!GetDataDirectoryCreatePerm(new_cluster.pgdata))
108-
{
109-
pg_log(PG_FATAL,"could not read permissions of directory \"%s\": %s\n",
110-
new_cluster.pgdata,strerror(errno));
111-
exit(1);
112-
}
108+
pg_fatal("could not read permissions of directory \"%s\": %s\n",
109+
new_cluster.pgdata,strerror(errno));
113110

114111
umask(pg_mode_mask);
115112

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp