[ekg2-commit] r4242 - trunk/ekg: trunk/ekg/net.c

SVN commit svn w toxygen.net
Pią, 8 Sie 2008, 21:16:41 CEST


Author: peres
Date: 2008-08-08 21:16:41 +0200 (Fri, 08 Aug 2008)
New Revision: 4242

Modified:
   trunk/ekg/net.c
Log:

Remove 'abort' variable — we don't need to use it anymore.



Modified: trunk/ekg/net.c
===================================================================
--- trunk/ekg/net.c	2008-08-08 19:06:39 UTC (rev 4241)
+++ trunk/ekg/net.c	2008-08-08 19:16:41 UTC (rev 4242)
@@ -368,15 +368,12 @@
 
 static WATCHER_LINE(ekg_connect_resolver_handler) {
 	struct ekg_connect_data *c = (struct ekg_connect_data*) data;
-	session_t *s;
-	int abort;
 
 	if (!c)
 		return -1;
-	abort = !((s = session_find(c->session)));
 
 	if (type) {
-		if (!abort) {
+		if (!session_find(c->session)) {
 			debug_function("ekg_connect_resolver_handler(), resolving done.\n");
 			if (c->prefer_comparison)
 				qsort(c->connect_queue, array_count(c->connect_queue), sizeof(char*),
@@ -385,7 +382,7 @@
 		ekg_connect_loop(c);
 		close(fd);
 		return -1;
-	} else if (abort)
+	} else if (!session_find(c->session))
 		return -1;
 
 	debug_function("ekg_connect_resolver_handler() = %s\n", watch);
@@ -471,7 +468,6 @@
 	int res = 0; 
 	socklen_t res_size = sizeof(res);
 	session_t *s;
-	int abort;
 
 	if (!c)
 		return -1;
@@ -481,10 +477,7 @@
 	if (type == 1)
 		return 0;
 
-	s = session_find(c->session);
-	abort = !((s = session_find(c->session)));
-
-	if (abort) {
+	if (!((s = session_find(c->session)))) {
 		ekg_connect_loop(c);
 		close(fd);
 		return -1;



Więcej informacji o liście dyskusyjnej ekg2-commit