From: Owen Dunn Date: Wed, 15 Feb 2017 19:50:14 +0000 (+0000) Subject: Return zero when reporting our version. X-Git-Tag: 0.68~14 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=52a4ccad27ad7334c63fbc02a5fd2bb37e83bc88;p=PuTTY.git Return zero when reporting our version. When called with -V to ask for our version, return 0 rather than 1. This is the usual behaviour observed by ssh(1) and other Unix commands. Also use exit() rather than cleanup_exit() in pscp.c and psftp.c ; at this point we have nothing to cleanup! --- diff --git a/pscp.c b/pscp.c index 01c9ffa2..35873553 100644 --- a/pscp.c +++ b/pscp.c @@ -2272,7 +2272,7 @@ void version(void) char *buildinfo_text = buildinfo("\n"); printf("pscp: %s\n%s\n", ver, buildinfo_text); sfree(buildinfo_text); - cleanup_exit(1); + exit(0); } void cmdline_error(const char *p, ...) diff --git a/psftp.c b/psftp.c index 09309a79..4fba2d73 100644 --- a/psftp.c +++ b/psftp.c @@ -2670,7 +2670,7 @@ static void version(void) char *buildinfo_text = buildinfo("\n"); printf("psftp: %s\n%s\n", ver, buildinfo_text); sfree(buildinfo_text); - cleanup_exit(1); + exit(0); } /* diff --git a/unix/uxpgnt.c b/unix/uxpgnt.c index 50f65168..41efcbc2 100644 --- a/unix/uxpgnt.c +++ b/unix/uxpgnt.c @@ -145,7 +145,7 @@ static void version(void) char *buildinfo_text = buildinfo("\n"); printf("pageant: %s\n%s\n", ver, buildinfo_text); sfree(buildinfo_text); - exit(1); + exit(0); } void keylist_update(void) diff --git a/unix/uxplink.c b/unix/uxplink.c index 97b5c50b..a2607fbb 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -599,7 +599,7 @@ static void version(void) char *buildinfo_text = buildinfo("\n"); printf("plink: %s\n%s\n", ver, buildinfo_text); sfree(buildinfo_text); - exit(1); + exit(0); } void frontend_net_error_pending(void) {} diff --git a/windows/winplink.c b/windows/winplink.c index 7c9c42aa..47470777 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -228,7 +228,7 @@ static void version(void) char *buildinfo_text = buildinfo("\n"); printf("plink: %s\n%s\n", ver, buildinfo_text); sfree(buildinfo_text); - exit(1); + exit(0); } char *do_select(SOCKET skt, int startup)