From: simon Date: Sat, 16 Jul 2011 12:03:14 +0000 (+0000) Subject: Mostly cosmetic change: don't claim to have found an SSH agent if X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/2527703c0690f4a24224068ff3a2e009d29447fa Mostly cosmetic change: don't claim to have found an SSH agent if SSH_AUTH_SOCK is defined to the empty string. (Because a common way to 'unset' it is to run commands like 'SSH_AUTH_SOCK= putty -load thing'.) git-svn-id: svn://svn.tartarus.org/sgt/putty@9225 cda61777-01e9-0310-a592-d414129be87e --- 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; }