]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
[3/5,librdmacm] rstream: initialize return value in server_connect()
authorDotan Barak <dotanb@dev.mellanox.co.il>
Tue, 9 Oct 2012 12:27:50 +0000 (12:27 +0000)
committerSean Hefty <sean.hefty@intel.com>
Tue, 9 Oct 2012 16:57:09 +0000 (09:57 -0700)
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

index 1d221d0f930b05ac14a8b3e56122dbff5d921d38..6ef60a19c8ba19b37c6bc9f80fa87167a8d918c1 100644 (file)
@@ -444,7 +444,7 @@ free:
 static int server_connect(void)
 {
        struct pollfd fds;
-       int ret;
+       int ret = 0;
 
        set_options(lrs);
        do {