]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[MTHCA] fixed a bug in pointer arithmetic, causing access violation
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 23 Apr 2006 16:19:22 +0000 (16:19 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 23 Apr 2006 16:19:22 +0000 (16:19 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@320 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/hw/mthca/user/mlnx_uvp_qp.c

index fbf3650eaff7d82473649c08630e8328e3df14bc..16cfbb3b48062f701d6168a613f34ed7eed01ef2 100644 (file)
@@ -953,7 +953,7 @@ int mthca_alloc_qp_buf(struct ibv_pd *pd, struct ibv_qp_cap *cap,
                        next->ee_nds = sz;
 
                        for (scatter = (void *) (next + 1);
-                            (void *) scatter < (void *) (next + (1 << qp->rq.wqe_shift));
+                            (void *) scatter < (void *) ((char*)next + (1 << qp->rq.wqe_shift));
                             ++scatter)
                                scatter->lkey = cl_hton32(MTHCA_INVAL_LKEY);
                }