@@ -101,27 +101,27 @@ executeQueryOrDie(PGconn *conn, const char *fmt,...)
101101/*
102102 * get_major_server_version()
103103 *
104- * gets the version (in unsigned int form) for the given" datadir" . Assumes
104+ * gets the version (in unsigned int form) for the given datadir. Assumes
105105 * that datadir is an absolute path to a valid pgdata directory. The version
106106 * is retrieved by reading the PG_VERSION file.
107107 */
108108uint32
109109get_major_server_version (ClusterInfo * cluster )
110110{
111- const char * datadir = cluster -> pgdata ;
112111FILE * version_fd ;
113112char ver_filename [MAXPGPATH ];
114113int integer_version = 0 ;
115114int fractional_version = 0 ;
116115
117- snprintf (ver_filename ,sizeof (ver_filename ),"%s/PG_VERSION" ,datadir );
116+ snprintf (ver_filename ,sizeof (ver_filename ),"%s/PG_VERSION" ,
117+ cluster -> pgdata );
118118if ((version_fd = fopen (ver_filename ,"r" ))== NULL )
119119return 0 ;
120120
121121if (fscanf (version_fd ,"%63s" ,cluster -> major_version_str )== 0 ||
122122sscanf (cluster -> major_version_str ,"%d.%d" ,& integer_version ,
123123& fractional_version )!= 2 )
124- pg_log (PG_FATAL ,"could not get version from %s\n" ,datadir );
124+ pg_log (PG_FATAL ,"could not get version from %s\n" ,cluster -> pgdata );
125125
126126fclose (version_fd );
127127