[master] 7f5704d remove needless additional invalidation of the file descriptor - VTCP_close already does this

Nils Goroll nils.goroll at uplex.de
Fri Feb 27 15:19:42 CET 2015


commit 7f5704d9b20accf6cc18eb3df1e4d768048bc4f6
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Feb 27 15:19:24 2015 +0100

    remove needless additional invalidation of the file descriptor - VTCP_close already does this

diff --git a/bin/varnishtest/vtc_server.c b/bin/varnishtest/vtc_server.c
index 0900756..044b617 100644
--- a/bin/varnishtest/vtc_server.c
+++ b/bin/varnishtest/vtc_server.c
@@ -263,10 +263,8 @@ cmd_server(CMD_ARGS)
 				(void)pthread_cancel(s->tp);
 				server_wait(s);
 			}
-			if (s->sock >= 0) {
+			if (s->sock >= 0)
 				VTCP_close(&s->sock);
-				s->sock = -1;
-			}
 			server_delete(s);
 		}
 		return;
@@ -312,10 +310,8 @@ cmd_server(CMD_ARGS)
 			continue;
 		}
 		if (!strcmp(*av, "-listen")) {
-			if (s->sock >= 0) {
+			if (s->sock >= 0)
 				VTCP_close(&s->sock);
-				s->sock = -1;
-			}
 			bprintf(s->listen, "%s", av[1]);
 			AZ(VSS_parse(s->listen, &s->addr, &s->port));
 			av++;



More information about the varnish-commit mailing list