>From 63d0d91d213ae3c84f1d3f82dd6879b43ec35bbc Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 4 Nov 2008 13:35:07 +0100 Subject: [PATCH] sockets: fix bind return value check. Signed-off-by: Gerd Hoffmann --- qemu-sockets.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index a5499a6..77d9921 100644 --- a/qemu-sockets.c +++ b/qemu-sockets.c @@ -165,7 +165,7 @@ int inet_listen(const char *str, char *ostr, int olen, #endif for (;;) { - if (bind(slisten, e->ai_addr, e->ai_addrlen) != 0) { + if (bind(slisten, e->ai_addr, e->ai_addrlen) == 0) { if (sockets_debug) fprintf(stderr,"%s: bind(%s,%s,%d): OK\n", __FUNCTION__, inet_strfamily(e->ai_family), uaddr, inet_getport(e)); -- 1.5.6.5