From owner-p4-projects@FreeBSD.ORG Sun Oct 28 01:43:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 56B2416A41B; Sun, 28 Oct 2007 01:43:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3BB916A418 for ; Sun, 28 Oct 2007 01:43:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E256C13C49D for ; Sun, 28 Oct 2007 01:43:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9S1hIRI095467 for ; Sun, 28 Oct 2007 01:43:18 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9S1hIQs095464 for perforce@freebsd.org; Sun, 28 Oct 2007 01:43:18 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 28 Oct 2007 01:43:18 GMT Message-Id: <200710280143.l9S1hIQs095464@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 128220 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2007 01:43:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=128220 Change 128220 by kmacy@kmacy:storage:toestack on 2007/10/28 01:42:24 fix bitmap macros to behave correctly when passed something other than a char * Affected files ... .. //depot/projects/toestack/sys/sys/param.h#6 edit Differences ... ==== //depot/projects/toestack/sys/sys/param.h#6 (text+ko) ==== @@ -238,10 +238,10 @@ #define MAXSYMLINKS 32 /* Bit map related macros. */ -#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) -#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) -#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) -#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) +#define setbit(a,i) (((uint8_t *)a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) (((uint8_t *)a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) (((uint8_t *)a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) ((((uint8_t *)a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* Macros for counting and rounding. */ #ifndef howmany