]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxagentc.c
Enhance my 'sresize' macro so that it type-checks the pointer you pass
[PuTTY.git] / unix / uxagentc.c
index 3605c60124316947ab346975086eccf463fb1cd3..9f579cd9488bda6efc085b30b4d6dcc65c413e12 100644 (file)
@@ -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;
 }