X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=rsh.c;h=04cbdf7a67e9f26d024da1117bf5a5a03596dd1b;hb=0516de30e8bdd26086e2a3edd3375981fd0c34d6;hp=bcb1c80d84b77e04bf843c2b38592284760ae165;hpb=f69714c38c6f3296a4bfba0d057e0f1605373f49;p=git.git diff --git a/rsh.c b/rsh.c index bcb1c80d..04cbdf7a 100644 --- 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