]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Return zero when reporting our version.
authorOwen Dunn <owen@greenend.org.uk>
Wed, 15 Feb 2017 19:50:14 +0000 (19:50 +0000)
committerOwen Dunn <owen@greenend.org.uk>
Wed, 15 Feb 2017 20:54:10 +0000 (20:54 +0000)
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!

pscp.c
psftp.c
unix/uxpgnt.c
unix/uxplink.c
windows/winplink.c

diff --git a/pscp.c b/pscp.c
index 01c9ffa2fa57dae18fb651c3dea7f70c995c4add..3587355347685815cfe4c76cfb741ed6f51fd02d 100644 (file)
--- 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 09309a79f4d47dfe5946353b2bc5ed90efb6d22d..4fba2d73fd184659572c67f27b56404773c7a618 100644 (file)
--- 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);
 }
 
 /*
index 50f6516860370cef6b8f14639b34a0275368800c..41efcbc2d81f405ddebb494c701ca42e34c9a88b 100644 (file)
@@ -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)
index 97b5c50bb070c575bf80f87616498d42c4f7c443..a2607fbb9d32753479ccde2bb7c1e8b6d5eed1cc 100644 (file)
@@ -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) {}
index 7c9c42aaa46375581baefea00a83571e1bd60349..4747077776b4b88f2d0695175424d1039efdc1dc 100644 (file)
@@ -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)