X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=rsh.c;h=04cbdf7a67e9f26d024da1117bf5a5a03596dd1b;hb=540bf654d007b3289adec37e3008c588ba677e25;hp=bcb1c80d84b77e04bf843c2b38592284760ae165;hpb=4852f7232b7a83fbd1b745520181bd67bf95911b;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