summaryrefslogtreecommitdiff
path: root/os/access.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/access.c')
-rw-r--r--os/access.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/access.c b/os/access.c
index 8828e0834..97246160c 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1137,12 +1137,12 @@ ComputeLocalClient(ClientPtr client)
/* Cut off any colon and whatever comes after it, see
* https://lists.freedesktop.org/archives/xorg-devel/2015-December/048164.html
*/
- cmd = strtok(cmd, ":");
+ char *tok = strtok(cmd, ":");
#if !defined(WIN32) || defined(__CYGWIN__)
- ret = strcmp(basename(cmd), "ssh") != 0;
+ ret = strcmp(basename(tok), "ssh") != 0;
#else
- ret = strcmp(cmd, "ssh") != 0;
+ ret = strcmp(tok, "ssh") != 0;
#endif
free(cmd);