9 Feb 2004 18:37
machdep.c: #if NPC > 0, but not #include "pc.h"
Ben Harris <bjh21 <at> NetBSD.org>
2004-02-09 17:37:30 GMT
2004-02-09 17:37:30 GMT
While trying to clean up pckbc(4) and friends, I noticed that both
arch/evbppc/ev64260/machdep.c and arch/sandpoint/sandpoint/machdep.c
contain the following function:
int
pckbc_machdep_cnattach(pckbc_tag_t kbctag, pckbc_slot_t kbcslot)
{
#if (NPC > 0)
return (pcconskbd_cnattach(kbctag, kbcslot));
#else
return (ENXIO);
#endif
}
Neither file, though, #includes "pc.h", so I don't think the NPC will ever
be defined, so pcconskbd_cnattach() will never be called and
pckbc_machdep_cnattach() will always return ENXIO. Am I right? Is it OK
for me to simplify pckbc_machdep_cnattach() appropriately?
--
--
Ben Harris <bjh21 <at> NetBSD.org>
Portmaster, NetBSD/acorn26 <URL:http://www.NetBSD.org/Ports/acorn26/>
RSS Feed