Patchwork [v2,2/2] socket: clean up redundant assignment

login
register
mail settings
Submitter Amos Kong
Date Aug. 3, 2012, 3:06 a.m.
Message ID <1343963182-28297-3-git-send-email-akong@redhat.com>
Download mbox | patch
Permalink /patch/174868/
State New
Headers show

Comments

Amos Kong - Aug. 3, 2012, 3:06 a.m.
Signed-off-by: Amos Kong <akong@redhat.com>
---
 qemu-sockets.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Luiz Capitulino - Aug. 3, 2012, 12:55 p.m.
On Fri,  3 Aug 2012 11:06:22 +0800
Amos Kong <akong@redhat.com> wrote:

> Signed-off-by: Amos Kong <akong@redhat.com>

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>

> ---
>  qemu-sockets.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/qemu-sockets.c b/qemu-sockets.c
> index 668fa93..beb2bb6 100644
> --- a/qemu-sockets.c
> +++ b/qemu-sockets.c
> @@ -284,7 +284,6 @@ int inet_connect_opts(QemuOpts *opts, Error **errp)
>                          inet_strfamily(e->ai_family),
>                          e->ai_canonname, uaddr, uport, strerror(errno));
>              closesocket(sock);
> -            sock = -1;
>              continue;
>          }
>          freeaddrinfo(res);

Patch

diff --git a/qemu-sockets.c b/qemu-sockets.c
index 668fa93..beb2bb6 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -284,7 +284,6 @@  int inet_connect_opts(QemuOpts *opts, Error **errp)
                         inet_strfamily(e->ai_family),
                         e->ai_canonname, uaddr, uport, strerror(errno));
             closesocket(sock);
-            sock = -1;
             continue;
         }
         freeaddrinfo(res);