From owner-freebsd-current Mon Sep 25 10:37:56 2000 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 42EF937B42C for ; Mon, 25 Sep 2000 10:37:53 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id LAA02975; Mon, 25 Sep 2000 11:37:50 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id LAA05096; Mon, 25 Sep 2000 11:37:50 -0600 (MDT) Message-Id: <200009251737.LAA05096@harmony.village.org> To: Falko Dressler Subject: Re: bug in ccard.c (pccardd code) Cc: freebsd-current@FreeBSD.ORG In-reply-to: Your message of "Mon, 25 Sep 2000 17:57:44 +0200." References: Date: Mon, 25 Sep 2000 11:37:50 -0600 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message Falko Dressler writes: : : I discovered a little bug in ccard.c which is part of the pccardd: : : *** cardd.c.orig Mon Sep 25 17:52:03 2000 : --- cardd.c Mon Sep 25 17:52:12 2000 : *************** : *** 546,552 **** : sp->config->index = cisconf->id; : break; : default: /* normal, use index value */ : ! for (cisconf = cis->conf; cisconf; cisconf = cisconf->next) : if (cisconf->id == sp->config->index) : break; : } : --- 546,552 ---- : sp->config->index = cisconf->id; : break; : default: /* normal, use index value */ : ! for (cisconf = cis->conf; cisconf->next; cisconf = cisconf->next) : if (cisconf->id == sp->config->index) : break; : } : : : Someone forgot to place the right pointer into the for-loop. Why does the change need to be made to cisconf->next. The old code looks good to me. Is the last item in the list wrong for some reason? The last item on the for loop will be evaluated, and then the middle test is done, so I don't see how this helps. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message