From owner-freebsd-commit Sat Dec 16 11:21:33 1995 Return-Path: owner-commit Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA26611 for freebsd-commit-outgoing; Sat, 16 Dec 1995 11:21:33 -0800 (PST) Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA26590 for cvs-all-outgoing; Sat, 16 Dec 1995 11:21:28 -0800 (PST) Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA26575 for cvs-sys-outgoing; Sat, 16 Dec 1995 11:21:24 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA26561 Sat, 16 Dec 1995 11:21:15 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id GAA07610; Sun, 17 Dec 1995 06:17:04 +1100 Date: Sun, 17 Dec 1995 06:17:04 +1100 From: Bruce Evans Message-Id: <199512161917.GAA07610@godzilla.zeta.org.au> To: CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, peter@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/i386 autoconf.c machdep.c Sender: owner-commit@FreeBSD.ORG Precedence: bulk > Modified: sys/i386/i386 autoconf.c machdep.c > Log: > Catch a couple more null devsw dereferences... There should be dummy tables so that all these tests aren't necessary: initial bdevsw[] = { &dummy, &dummy, ... }; Similarly, inside each *bdevsw[maj], there should be pointers to dummy functions, not null pointers. The cost of indirect tables may be more than compensated for by the simpler indexing: old now --- --- (&bdevsw[maj])->d_open *bdevsw[maj]->d_open ^^^^^^^^^^^^^^ ^^^^^^^^^^^^ complicated address calc. simple address calc., extra indirection Bruce