From owner-freebsd-arch Tue Jul 4 8:58:46 2000 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 043D137B585; Tue, 4 Jul 2000 08:58:41 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id BAA20018; Wed, 5 Jul 2000 01:58:34 +1000 Date: Wed, 5 Jul 2000 01:58:30 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Brian Fundakowski Feldman Cc: Andrzej Bialecki , dfr@FreeBSD.ORG, jlemon@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG Subject: Re: UPDATE: Re: Dynamic sysctls, next round (please review) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 4 Jul 2000, Brian Fundakowski Feldman wrote: > On Mon, 3 Jul 2000, Andrzej Bialecki wrote: > > > What's the point of all of the KASSERT()s against > > > NULL? The system will crash in either case. > > > > I planned to remove them later on. Now they provide easy means of > > identifying the cause. > > It's just my anti-bloat feelings that say they shouldn't be there. They > don't hurt much, but they really don't help like checking for NULL > function pointers does. NULL data pointers are easy to debug, but NULL > function pointers... trashing your IP is not fun :( The caller's IP can easily be recovered from the stack. Trashed IP's for jumps are more interesting. > > > > Why was const removed > > > from const char *oid_name? > > > > To silence the compiler warning: it didn't like assigning and freeing > > pointers that are const char *. To break the compiler warning :-). Actually to lose the protection of declaring the string as const. Since dynamically allocated strings aren't const, this seems to be the least of evils. > Silence those few warnings yourself with casts where it is necessary. The > const will prevent mistakes by others later, since they do _not_ have a > reason to be modifying oid_name. -Wcast-qual prevents breaking the warning using a cast :-). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message