X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/db9b7dcedb001b942ad945a56b2d7bf9b77d7a6a..e497389e51d4c6b50e01fb2e30af9c5a8caf9a65:/unix/uxagentc.c diff --git a/unix/uxagentc.c b/unix/uxagentc.c index 3605c601..9f579cd9 100644 --- a/unix/uxagentc.c +++ b/unix/uxagentc.c @@ -17,7 +17,8 @@ int agent_exists(void) { - if (getenv("SSH_AUTH_SOCK") != NULL) + const char *p = getenv("SSH_AUTH_SOCK"); + if (p && *p) return TRUE; return FALSE; }