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

Alon Levy alevy at redhat.com
Mon Mar 12 13:54:52 PDT 2012


On Mon, Mar 12, 2012 at 04:41:33PM -0400, nshalman at elys.com wrote:
> From: Nahum Shalman <nshalman at elys.com>

ACK.

> 
> 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
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list