From: Jon Mason <[EMAIL PROTECTED]>

Non-supported functions should return NULL when returning pointers.
Some/Most user space programs will not check for a (void *) to -ENOSYS,
which can look like a real address until referenced.

This patch converts the uses of (void *) -ENOSYS to NULL.

Signed-off-by: Jon Mason <[EMAIL PROTECTED]>
---
 src/verbs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/verbs.c b/src/verbs.c
index c6c1356..447dde3 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -263,7 +263,7 @@ int iwch_destroy_cq(struct ibv_cq *ibcq)
 struct ibv_srq *iwch_create_srq(struct ibv_pd *pd,
                                struct ibv_srq_init_attr *attr)
 {
-       return (void *) -ENOSYS;
+       return NULL;
 }
 
 int iwch_modify_srq(struct ibv_srq *srq, struct ibv_srq_attr *attr, 
@@ -407,7 +407,7 @@ int iwch_destroy_qp(struct ibv_qp *ibqp)
 
 struct ibv_ah *iwch_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)
 {
-       return (void *) -ENOSYS;
+       return NULL;
 }
 
 int iwch_destroy_ah(struct ibv_ah *ah)
-- 
1.5.3.3
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to