diff options
Diffstat (limited to 'src/port/exec.c')
-rw-r--r-- | src/port/exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index 1fc0dffaa13..5e7fb3e5b48 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/exec.c,v 1.43.2.1 2008/02/29 15:31:37 mha Exp $ + * $PostgreSQL: pgsql/src/port/exec.c,v 1.43.2.2 2008/03/31 01:32:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -79,8 +79,8 @@ validate_exec(const char *path) #else char path_exe[MAXPGPATH + sizeof(".exe") - 1]; #endif - int is_r = 0; - int is_x = 0; + int is_r; + int is_x; #ifdef WIN32 /* Win32 requires a .exe suffix for stat() */ @@ -102,7 +102,7 @@ validate_exec(const char *path) if (stat(path, &buf) < 0) return -1; - if ((buf.st_mode & S_IFMT) != S_IFREG) + if (!S_ISREG(buf.st_mode)) return -1; /* @@ -330,7 +330,7 @@ resolve_symlinks(char *path) fname = path; if (lstat(fname, &buf) < 0 || - (buf.st_mode & S_IFMT) != S_IFLNK) + !S_ISLNK(buf.st_mode)) break; rllen = readlink(fname, link_buf, sizeof(link_buf)); |