[6.0] e44526eed Polish

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:13 UTC 2018


commit e44526eedcaded131a055dacac1023ba32674908
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Sep 4 15:19:29 2018 +0000

    Polish

diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index 2247cca0f..78246d6fa 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -302,8 +302,8 @@ do_curses(void *arg)
 		case 'Q':
 		case 'q':
 			AZ(raise(SIGINT));
-			AC(endwin());
-			return (NULL);
+			quit = 1;
+			break;
 		default:
 			AC(beep());
 			break;
@@ -389,18 +389,14 @@ main(int argc, char **argv)
 	vut->dispatch_priv = NULL;
 	vut->sighup_f = sighup;
 	if (once) {
-		VUT_Main(vut);
+		(void)VUT_Main(vut);
 		dump();
 	} else {
-		if (pthread_create(&thr, NULL, do_curses, NULL) != 0) {
-			fprintf(stderr, "pthread_create(): %s\n",
-			    strerror(errno));
-			exit(1);
-		}
-		VUT_Main(vut);
+		AZ(pthread_create(&thr, NULL, do_curses, NULL));
+		(void)VUT_Main(vut);
 		end_of_file = 1;
 		AZ(pthread_join(thr, NULL));
 	}
 	VUT_Fini(&vut);
-	exit(0);
+	return (0);
 }


More information about the varnish-commit mailing list