diff options
Diffstat (limited to 'src/port/path.c')
-rw-r--r-- | src/port/path.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/port/path.c b/src/port/path.c index e8faac3a260..d0f72df29c2 100644 --- a/src/port/path.c +++ b/src/port/path.c @@ -777,7 +777,8 @@ get_home_path(char *ret_path) struct passwd pwdstr; struct passwd *pwd = NULL; - if (pqGetpwuid(geteuid(), &pwdstr, pwdbuf, sizeof(pwdbuf), &pwd) != 0) + (void) pqGetpwuid(geteuid(), &pwdstr, pwdbuf, sizeof(pwdbuf), &pwd); + if (pwd == NULL) return false; strlcpy(ret_path, pwd->pw_dir, MAXPGPATH); return true; |