Skip to contentSkip to conversation

trivial fix of qemu-sockets.c

PATCH In review Amos Kong 3 participants 7 messages Aug 3, 2012

lore
Share & tools
lore

Amos Kong

author
#0 lore raw

v2 cover trivial fix of qemu-sockets.c

Those patches fix trivial issues which were found
in the second review.

Amos Kong (2):
remove unused include of error.h
socket: clean up redundant assignment

 qemu-sockets.c |    1 -
 qemu_socket.h  |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

Changes from v1:
- drop wrong patch: [PATCH] socket: remove redundant check

author
#1 lore raw

PATCH v2 1/2 remove unused include of error.h

---
 qemu_socket.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
qemu_socket.h +0 -1
index 4689ff3..1a2f517 100644
@@ -27,7 +27,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
 #endif /* !_WIN32 */
 
 #include "qemu-option.h"
-#include "error.h"
 #include "qerror.h"
 
 /* misc helpers */
Signature · 1 line
1.7.1
#2 lore raw

Re: [Qemu-devel] [PATCH v2 1/2] remove unused include of error.h

Quoted 10 lines · On Fri, 3 Aug 2012 11:06:21 +0800 Amos Kong <[email protected]> wrote:
---
 qemu_socket.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
qemu_socket.h +0 -0
index 4689ff3..1a2f517 100644

qemu_socket.h int inet_aton(const char *cp, struct in_addr *ia); · line 30

Quoted 5 lines
qemu_socket.h +0 -1
@@ -27,7 +27,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
 #endif /* !_WIN32 */
 
 #include "qemu-option.h"
-#include "error.h"
 #include "qerror.h"

This is wrong. There are functions in this header that takes an Error argument (which is declared in error.h).

qerror.h should be dropped though, as it's deprecated and as such shouldn't be in a public header like this. If you get build failures, then you can include it in the .c files where it's missing.

Quoted 2 lines
qemu_socket.h +0 -0
 /* misc helpers */
author
#4 lore raw

PATCH v2 2/2 socket: clean up redundant assignment

In reply to Amos Kong
---
 qemu-sockets.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
qemu-sockets.c +0 -1
index 668fa93..beb2bb6 100644
@@ -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);
Signature · 1 line
1.7.1
Reviewed-by on v2 2/2
#5 lore raw

Re: [Qemu-devel] [PATCH v2 2/2] socket: clean up redundant assignment

Quoted 1 line · On Fri, 3 Aug 2012 11:06:22 +0800 Amos Kong <[email protected]> wrote:
Quoted 16 lines
---
 qemu-sockets.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
qemu-sockets.c +0 -1
index 668fa93..beb2bb6 100644
@@ -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);
#6 lore raw
In reply to Amos Kong
Quoted 7 lines · Amos Kong

Those patches fix trivial issues which were found
in the second review.

Amos Kong (2):
remove unused include of error.h
socket: clean up redundant assignment

Quoted 6 lines
 qemu-sockets.c |    1 -
 qemu_socket.h  |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

Changes from v1:
- drop wrong patch: [PATCH] socket: remove redundant check

Thanks, merged. I will update the pending trivial-patches pull request to include these patches.

https://github.com/stefanha/qemu/commits/trivial-patches

Stefan