Variable lpr_alive is never initialized. I suggest a removal of the code that deals with this variable.
But, on the other hand, maybe the variable should be initialized to all zero. It's not so clear from the code. * i386/i386at/lpr.c (lpr_alive): Remove variable. Remove the if. --- i386/i386at/lpr.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c index 557eb15..e580da9 100644 --- a/i386/i386at/lpr.c +++ b/i386/i386at/lpr.c @@ -67,8 +67,6 @@ struct bus_driver lprdriver = { struct tty lpr_tty[NLPR]; -int lpr_alive[NLPR]; - int lprprobe(port, dev) struct bus_device *dev; @@ -85,14 +83,7 @@ struct bus_device *dev; outb(INTR_ENAB(addr),0x07); outb(DATA(addr),0xaa); ret = inb(DATA(addr)) == 0xaa; - if (ret) { - if (lpr_alive[unit]) { - printf("lpr: Multiple alive entries for unit %d.\n", unit); - printf("lpr: Ignoring entry with address = %x .\n", addr); - ret = 0; - } else - lpr_alive[unit]++; - } + return(ret); } -- 1.8.1.4