Skip to content

Commit 3255851

Browse files
committed
Small variable rename in exec.c.
1 parent ceceeff commit 3255851

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/include/port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.34 2004/05/20 01:47:01 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.35 2004/05/20 15:38:11 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -59,7 +59,7 @@ extern void get_pkglib_path(const char *my_exec_path, char *ret_path);
5959

6060

6161
/* Portable way to find binaries */
62-
extern int find_my_exec(const char *argv0, char *full_path);
62+
extern int find_my_exec(const char *argv0, char *retpath);
6363
extern int find_other_exec(const char *argv0, char const *target,
6464
const char *versionstr, char *retpath);
6565
#if defined(__CYGWIN__) || defined(WIN32)

src/port/exec.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/port/exec.c,v 1.11 2004/05/20 15:35:41 momjian Exp $
10+
* $PostgreSQL: pgsql/src/port/exec.c,v 1.12 2004/05/20 15:38:11 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -179,7 +179,7 @@ validate_exec(char *path)
179179
* non-threaded binaries, not in library routines.
180180
*/
181181
int
182-
find_my_exec(const char *argv0, char *full_path)
182+
find_my_exec(const char *argv0, char *retpath)
183183
{
184184
char cwd[MAXPGPATH];
185185
char *p;
@@ -210,19 +210,19 @@ find_my_exec(const char *argv0, char *full_path)
210210
}
211211

212212
if (is_absolute_path(argv0))
213-
StrNCpy(full_path, argv0, MAXPGPATH);
213+
StrNCpy(retpath, argv0, MAXPGPATH);
214214
else
215-
snprintf(full_path, MAXPGPATH, "%s/%s", cwd, argv0);
215+
snprintf(retpath, MAXPGPATH, "%s/%s", cwd, argv0);
216216

217-
canonicalize_path(full_path);
218-
if (validate_exec(full_path) == 0)
217+
canonicalize_path(retpath);
218+
if (validate_exec(retpath) == 0)
219219
{
220-
win32_make_absolute(full_path);
220+
win32_make_absolute(retpath);
221221
return 0;
222222
}
223223
else
224224
{
225-
log_error("invalid binary \"%s\"", full_path);
225+
log_error("invalid binary \"%s\"", retpath);
226226
return -1;
227227
}
228228
}
@@ -231,8 +231,8 @@ find_my_exec(const char *argv0, char *full_path)
231231
/* Win32 checks the current directory first for names without slashes */
232232
if (validate_exec(argv0) == 0)
233233
{
234-
snprintf(full_path, MAXPGPATH, "%s/%s", cwd, argv0);
235-
win32_make_absolute(full_path);
234+
snprintf(retpath, MAXPGPATH, "%s/%s", cwd, argv0);
235+
win32_make_absolute(retpath);
236236
return 0;
237237
}
238238
#endif
@@ -254,21 +254,21 @@ find_my_exec(const char *argv0, char *full_path)
254254
*endp = '\0';
255255

256256
if (is_absolute_path(startp))
257-
snprintf(full_path, MAXPGPATH, "%s/%s", startp, argv0);
257+
snprintf(retpath, MAXPGPATH, "%s/%s", startp, argv0);
258258
else
259-
snprintf(full_path, MAXPGPATH, "%s/%s/%s", cwd, startp, argv0);
259+
snprintf(retpath, MAXPGPATH, "%s/%s/%s", cwd, startp, argv0);
260260

261-
canonicalize_path(full_path);
262-
switch (validate_exec(full_path))
261+
canonicalize_path(retpath);
262+
switch (validate_exec(retpath))
263263
{
264264
case 0: /* found ok */
265-
win32_make_absolute(full_path);
265+
win32_make_absolute(retpath);
266266
free(path);
267267
return 0;
268268
case -1: /* wasn't even a candidate, keep looking */
269269
break;
270270
case -2: /* found but disqualified */
271-
log_error("could not read binary \"%s\"", full_path);
271+
log_error("could not read binary \"%s\"", retpath);
272272
free(path);
273273
return -1;
274274
}
@@ -286,7 +286,7 @@ find_my_exec(const char *argv0, char *full_path)
286286
* Win32 has a native way to find the executable name, but the above
287287
* method works too.
288288
*/
289-
if (GetModuleFileName(NULL,full_path,MAXPGPATH) == 0)
289+
if (GetModuleFileName(NULL, retpath, MAXPGPATH) == 0)
290290
log_error("GetModuleFileName failed (%i)",(int)GetLastError());
291291
#endif
292292
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy