]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Refresh of srq_ex
authorSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 17:04:52 +0000 (10:04 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 17:04:52 +0000 (10:04 -0700)
include/infiniband/verbs.h

index bb1d54ba59b3225bd68d9a6be26fa7863d49f942..c75b239c8900d7a6f93c1faff812a3d2a95d67ce 100644 (file)
@@ -1050,7 +1050,11 @@ static inline struct ibv_srq *
 ibv_create_srq_ex(struct ibv_pd *pd, struct ibv_srq_init_attr_ex *srq_init_attr_ex)
 {
        struct verbs_context *vctx = verbs_get_ctx_op(pd->context, create_srq_ex);
-       return vctx ? vctx->create_srq_ex(pd, srq_init_attr_ex) : NULL;
+       if (!vctx) {
+               errno = ENOSYS;
+               return NULL;
+       }
+       return vctx->create_srq_ex(pd, srq_init_attr_ex);
 }
 
 /**
@@ -1077,11 +1081,14 @@ int ibv_modify_srq(struct ibv_srq *srq,
  */
 int ibv_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr);
 
-static inline struct ibv_srq *
-ibv_get_srq_num(struct ibv_srq *srq)
+static inline uint32_t ibv_get_srq_num(struct ibv_srq *srq)
 {
        struct verbs_context *vctx = verbs_get_ctx_op(pd->context, get_srq_num);
-       return vctx ? vctx->get_srq_num(srq) : NULL;
+       if (!vctx) {
+               errno = ENOSYS;
+               return 0;
+       }
+       return vctx->get_srq_num(srq);
 }
 
 /**