summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2011-06-15 21:23:02 +0000
committerBruce Momjian2011-06-15 21:23:02 +0000
commite3df3572f66aa099d337f013dceef7d519ef8398 (patch)
tree9df727bd9e76f7f283f30c7145699848252ae1aa
parent10db3de66eb226e9aed32e789abd532c41f0f471 (diff)
In pg_upgrade, clean up code layout in validateDirectoryOption().
-rw-r--r--contrib/pg_upgrade/option.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/pg_upgrade/option.c b/contrib/pg_upgrade/option.c
index abb74a5bfa..8153e3087a 100644
--- a/contrib/pg_upgrade/option.c
+++ b/contrib/pg_upgrade/option.c
@@ -288,21 +288,19 @@ or\n"), old_cluster.port, new_cluster.port, os_info.user);
* user hasn't provided the required directory name.
*/
static void
-validateDirectoryOption(char **dirpath,
- char *envVarName, char *cmdLineOption, char *description)
+validateDirectoryOption(char **dirpath, char *envVarName,
+ char *cmdLineOption, char *description)
{
- if (*dirpath == NULL || (strlen(*dirpath) == 0))
+ if (*dirpath == NULL || strlen(*dirpath) == 0)
{
const char *envVar;
if ((envVar = getenv(envVarName)) && strlen(envVar))
*dirpath = pg_strdup(envVar);
else
- {
pg_log(PG_FATAL, "You must identify the directory where the %s\n"
"Please use the %s command-line option or the %s environment variable\n",
description, cmdLineOption, envVarName);
- }
}
/*