From patchwork Tue Feb 2 13:29:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 76375 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o12DUeBP005763 for ; Tue, 2 Feb 2010 13:30:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755869Ab0BBNaj (ORCPT ); Tue, 2 Feb 2010 08:30:39 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:36727 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755792Ab0BBNaj (ORCPT ); Tue, 2 Feb 2010 08:30:39 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 2 Feb 2010 15:30:30 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Feb 2010 15:29:37 +0200 Message-ID: <4B6828B6.5050005@dev.mellanox.co.il> Date: Tue, 02 Feb 2010 15:29:26 +0200 From: Yevgeny Kliteynik Reply-To: kliteyn@dev.mellanox.co.il User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky CC: Linux RDMA Subject: [PATCH] opensm/complib/cl_ptr_vector.c: fix bug/compiler warning X-OriginalArrivalTime: 02 Feb 2010 13:29:37.0072 (UTC) FILETIME=[C3D6F300:01CAA40B] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17168.007 X-TM-AS-Result: No--6.050000-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 02 Feb 2010 13:30:40 +0000 (UTC) diff --git a/opensm/complib/cl_ptr_vector.c b/opensm/complib/cl_ptr_vector.c index 8ccb9f0..36db4db 100644 --- a/opensm/complib/cl_ptr_vector.c +++ b/opensm/complib/cl_ptr_vector.c @@ -302,7 +302,8 @@ size_t cl_ptr_vector_find_from_end(IN const cl_ptr_vector_t * const p_vector, while (i) { /* Invoke the callback for the current element. */ - if (pfn_callback(i, (void *)p_vector->p_ptr_array[--i], + i--; + if (pfn_callback(i, (void *)p_vector->p_ptr_array[i], (void *)context) == CL_SUCCESS) { return (i); }