]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
In pg_upgrade, clean up code layout in validateDirectoryOption().
authorBruce Momjian <bruce@momjian.us>
Wed, 15 Jun 2011 21:23:02 +0000 (17:23 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 15 Jun 2011 21:23:02 +0000 (17:23 -0400)
contrib/pg_upgrade/option.c

index abb74a5bfa44b38881790885fd5d31f6d2e013a2..8153e3087a818bf5f8a8d68972e1f502c958654f 100644 (file)
@@ -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);
-               }
        }
 
        /*