From owner-freebsd-current Wed Nov 24 8:19:26 1999 Delivered-To: freebsd-current@freebsd.org Received: from laurasia.com.au (lauras.lnk.telstra.net [139.130.93.142]) by hub.freebsd.org (Postfix) with ESMTP id 59625152C3 for ; Wed, 24 Nov 1999 08:19:08 -0800 (PST) (envelope-from mike@laurasia.com.au) Received: (from mike@localhost) by laurasia.com.au (8.9.1a/8.9.1) id AAA28147; Thu, 25 Nov 1999 00:18:43 +0800 (WST) From: Michael Kennett Message-Id: <199911241618.AAA28147@laurasia.com.au> Subject: Re: FreeBSD security auditing project. In-Reply-To: <199911241519.KAA29757@khavrinen.lcs.mit.edu> from Garrett Wollman at "Nov 24, 99 10:19:49 am" To: wollman@khavrinen.lcs.mit.edu (Garrett Wollman) Date: Thu, 25 Nov 1999 00:18:42 +0800 (WST) Cc: current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Garrett Wollman wrote: > > Perhaps if name[] had been declared thus: > > #define INTTYPE_NCHARS(t) ((sizeof(t) * 3 * CHAR_BIT + 7) / 8) > > char name[(sizeof "ipfw: ") + INTTYPE_NCHARS(int)]; Or alternatively (removing a bit more magic): #include #define INTTYPE_NCHARS(t) (howmany (sizeof(t) * 3 * CHAR_BIT, 8)) The macro howmany() is quite useful. It is also in Mike Kennett (mike@laurasia.com.au) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message