From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39317 invoked by alias); 12 Jul 2017 06:08:24 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 70339 invoked by uid 10080); 12 Jul 2017 06:06:16 -0000 Date: Wed, 12 Jul 2017 06:08:00 -0000 Message-ID: <20170712060616.70326.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Synchronize RTEMS with FreeBSD X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: 2d9c69da1cd1e8d0f715bbb304debd32d5279045 X-Git-Newrev: a3617d7bde0ac1f816f9311f6d715b0b73f6ecff X-SW-Source: 2017-q3/txt/msg00014.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a3617d7bde0ac1f816f9311f6d715b0b73f6ecff commit a3617d7bde0ac1f816f9311f6d715b0b73f6ecff Author: Sebastian Huber Date: Wed Jul 12 08:03:29 2017 +0200 Synchronize RTEMS with FreeBSD Signed-off-by: Sebastian Huber Diff: --- newlib/libc/sys/rtems/include/sys/bitset.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/bitset.h b/newlib/libc/sys/rtems/include/sys/bitset.h index 4c58f1f..931daf9 100644 --- a/newlib/libc/sys/rtems/include/sys/bitset.h +++ b/newlib/libc/sys/rtems/include/sys/bitset.h @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/sys/sys/bitset.h 320755 2017-07-06 21:47:17Z kib $ + * $FreeBSD: head/sys/sys/bitset.h 320893 2017-07-11 12:35:44Z kib $ */ #ifndef _SYS_BITSET_H_ @@ -221,10 +221,10 @@ int __bit; \ \ __bit = 0; \ - for (__i = __bitset_words((_s)) - 1; __i >= 0; __i--) { \ - if ((p)->__bits[__i] != 0) { \ - __bit = flsl((p)->__bits[__i]); \ - __bit += __i * _BITSET_BITS; \ + for (__i = __bitset_words((_s)); __i > 0; __i--) { \ + if ((p)->__bits[__i - 1] != 0) { \ + __bit = flsl((p)->__bits[__i - 1]); \ + __bit += (__i - 1) * _BITSET_BITS; \ break; \ } \ } \