diff mbox

[librdmacm,4/5] rsocket: Return 0 on success for SOL_RDMA options

Message ID 1375482022-5953-5-git-send-email-sean.hefty@intel.com (mailing list archive)
State Rejected
Headers show

Commit Message

Hefty, Sean Aug. 2, 2013, 10:20 p.m. UTC
From: Sean Hefty <sean.hefty@intel.com>

The processing of SOL_RDMA does not set the return value in
the case of successfully handled options.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
---
 src/rsocket.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/src/rsocket.c b/src/rsocket.c
index 57df290..d544dd0 100644
--- a/src/rsocket.c
+++ b/src/rsocket.c
@@ -3314,18 +3314,22 @@  int rsetsockopt(int socket, int level, int optname,
 		switch (optname) {
 		case RDMA_SQSIZE:
 			rs->sq_size = min((*(uint32_t *) optval), RS_QP_MAX_SIZE);
+			ret = 0;
 			break;
 		case RDMA_RQSIZE:
 			rs->rq_size = min((*(uint32_t *) optval), RS_QP_MAX_SIZE);
+			ret = 0;
 			break;
 		case RDMA_INLINE:
 			rs->sq_inline = min(*(uint32_t *) optval, RS_QP_MAX_SIZE);
 			if (rs->sq_inline < RS_MIN_INLINE)
 				rs->sq_inline = RS_MIN_INLINE;
+			ret = 0;
 			break;
 		case RDMA_IOMAPSIZE:
 			rs->target_iomap_size = (uint16_t) rs_scale_to_value(
 				(uint8_t) rs_value_to_scale(*(int *) optval, 8), 8);
+			ret = 0;
 			break;
 		case RDMA_ROUTE:
 			if ((rs->optval = calloc(optlen, 1))) {