Patchwork trivial fix of inet_listen() parameter

login
register
mail settings
Submitter Amos Kong
Date Sept. 29, 2012, 9:32 a.m.
Message ID <1348911151-7744-1-git-send-email-akong@redhat.com>
Download mbox | patch
Permalink /patch/188024/
State New
Headers show

Comments

Amos Kong - Sept. 29, 2012, 9:32 a.m.
.. int inet_listen(const char *str, char *ostr, int olen,
..                 int socktype, int port_offset, Error **errp)

Here 'ostr' is NULL, so change 'olen' to zero.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 migration-tcp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Igor Mammedov - Sept. 29, 2012, 8:57 p.m.
On Sat, 29 Sep 2012 17:32:31 +0800
Amos Kong <akong@redhat.com> wrote:

> .. int inet_listen(const char *str, char *ostr, int olen,
> ..                 int socktype, int port_offset, Error **errp)
> 
> Here 'ostr' is NULL, so change 'olen' to zero.
> 
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  migration-tcp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/migration-tcp.c b/migration-tcp.c
> index a15c2b8..34d6d89 100644
> --- a/migration-tcp.c
> +++ b/migration-tcp.c
> @@ -123,7 +123,7 @@ int tcp_start_incoming_migration(const char *host_port, Error **errp)
>  {
>      int s;
>  
> -    s = inet_listen(host_port, NULL, 256, SOCK_STREAM, 0, errp);
> +    s = inet_listen(host_port, NULL, 0, SOCK_STREAM, 0, errp);
>  
>      if (s < 0) {
>          return -1;
> -- 
> 1.7.1
> 
Reviewed-By: Igor Mammedov <imammedo@redhat.com>

Patch

diff --git a/migration-tcp.c b/migration-tcp.c
index a15c2b8..34d6d89 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -123,7 +123,7 @@  int tcp_start_incoming_migration(const char *host_port, Error **errp)
 {
     int s;
 
-    s = inet_listen(host_port, NULL, 256, SOCK_STREAM, 0, errp);
+    s = inet_listen(host_port, NULL, 0, SOCK_STREAM, 0, errp);
 
     if (s < 0) {
         return -1;