[Spice-devel] [PATCH] server: remove superfluous check

nshalman at elys.com nshalman at elys.com
Mon Mar 12 13:41:33 PDT 2012


From: Nahum Shalman <nshalman at elys.com>

no need to duplicate the check that the fd isn't -1
---
 server/reds.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index dc009f4..c54d30c 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2999,9 +2999,6 @@ static int reds_init_net(void)
 
     if (spice_listen_socket_fd != -1 ) {
         reds->listen_socket = spice_listen_socket_fd;
-        if (-1 == reds->listen_socket) {
-            return -1;
-        }
         reds->listen_watch = core->watch_add(reds->listen_socket,
                                              SPICE_WATCH_EVENT_READ,
                                              reds_accept, NULL);
-- 
1.7.7.6



More information about the Spice-devel mailing list