[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/trunk@320 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/user/mlnx_uvp_qp.c

index fbf3650..16cfbb3 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);
                }