Description: Dereference pointer to deal with -Wpointer-compare warning.
Author: Agustin Martin <agmartin@debian.org>
Forwarded: not-needed

Fix warning: comparison between pointer and zero character constant [-Wpointer-compare]

pam_encfs.c: In function 'getHome':
pam_encfs.c:249:40: warning: comparison between pointer and zero character constant [-Wpointer-compare]
  249 |         if (pwd->pw_dir && pwd->pw_dir != '\0')
      |                                        ^~
pam_encfs.c:249:28: note: did you mean to dereference the pointer?
  249 |         if (pwd->pw_dir && pwd->pw_dir != '\0')
      |                            ^


--- a/pam_encfs.c
+++ b/pam_encfs.c
@@ -246,7 +246,7 @@ const char *getHome(struct passwd *pwd,
     
     if (!tmp || *tmp == '\0')
     {
-        if (pwd->pw_dir && pwd->pw_dir != '\0')
+        if (pwd->pw_dir && *pwd->pw_dir != '\0')
             return pwd->pw_dir;
         else
             return NULL;
