diff mbox

[3/5,librdmacm] rstream: initialize return value in server_connect()

Message ID 1349785672-1921-4-git-send-email-dotanb@dev.mellanox.co.il (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dotan Barak Oct. 9, 2012, 12:27 p.m. UTC
If use_async == 0 and rs_accept() passes (i.e. non negative value), then
the return value from the function was uninitialized.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
---
 examples/rstream.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/examples/rstream.c b/examples/rstream.c
index 1d221d0..6ef60a1 100644
--- a/examples/rstream.c
+++ b/examples/rstream.c
@@ -444,7 +444,7 @@  free:
 static int server_connect(void)
 {
 	struct pollfd fds;
-	int ret;
+	int ret = 0;
 
 	set_options(lrs);
 	do {