[PATCH] Documentation for git-clone-dumb-http.
[gitweb.git] / rsh.c
diff --git a/rsh.c b/rsh.c
index bcb1c80d84b77e04bf843c2b38592284760ae165..04cbdf7a67e9f26d024da1117bf5a5a03596dd1b 100644 (file)
--- a/rsh.c
+++ b/rsh.c
@@ -56,8 +56,10 @@ int setup_connection(int *fd_in, int *fd_out, const char *remote_prog,
                return error("Couldn't create socket");
        }
        if (!fork()) {
-               const char *ssh = getenv("GIT_SSH") ? : "ssh";
-               const char *ssh_basename = strrchr(ssh, '/');
+               const char *ssh, *ssh_basename;
+               ssh = getenv("GIT_SSH");
+               if (!ssh) ssh = "ssh";
+               ssh_basename = strrchr(ssh, '/');
                if (!ssh_basename)
                        ssh_basename = ssh;
                else