@@ -101,27 +101,27 @@ executeQueryOrDie(PGconn *conn, const char *fmt,...)
101
101
/*
102
102
* get_major_server_version()
103
103
*
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
105
105
* that datadir is an absolute path to a valid pgdata directory. The version
106
106
* is retrieved by reading the PG_VERSION file.
107
107
*/
108
108
uint32
109
109
get_major_server_version (ClusterInfo * cluster )
110
110
{
111
- const char * datadir = cluster -> pgdata ;
112
111
FILE * version_fd ;
113
112
char ver_filename [MAXPGPATH ];
114
113
int integer_version = 0 ;
115
114
int fractional_version = 0 ;
116
115
117
- snprintf (ver_filename ,sizeof (ver_filename ),"%s/PG_VERSION" ,datadir );
116
+ snprintf (ver_filename ,sizeof (ver_filename ),"%s/PG_VERSION" ,
117
+ cluster -> pgdata );
118
118
if ((version_fd = fopen (ver_filename ,"r" ))== NULL )
119
119
return 0 ;
120
120
121
121
if (fscanf (version_fd ,"%63s" ,cluster -> major_version_str )== 0 ||
122
122
sscanf (cluster -> major_version_str ,"%d.%d" ,& integer_version ,
123
123
& 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 );
125
125
126
126
fclose (version_fd );
127
127