# HG changeset patch # User Erik Quanstrom # Date 1322730618 -3600 # Node ID 9682aa55b3ac8507a50edb440022b65f0832cef3 # Parent 80599305e5fb2bf57a2ef58088086d8c4656f18b apic: correct warning message the message (as nemo points out!) printed is off-by one so messages like apicinit%d: nvlt 6 > max (6). get printed. R=nixiedev, nemo.mbox CC=nix-dev http://codereview.appspot.com/5449049 Committer: Francisco J Ballesteros diff -r 80599305e5fb -r 9682aa55b3ac sys/src/nix/k10/apic.c --- a/sys/src/nix/k10/apic.c Thu Dec 01 10:09:26 2011 +0100 +++ b/sys/src/nix/k10/apic.c Thu Dec 01 10:10:18 2011 +0100 @@ -208,9 +208,9 @@ */ ver = apicrget(Ver); nlvt = ((ver>>16) & 0xff) + 1; - if(nlvt-1 > nelem(apic->lvt)){ + if(nlvt > nelem(apic->lvt)){ print("apicinit%d: nlvt %d > max (%d)\n", - apicno, nlvt-1, nelem(apic->lvt)); + apicno, nlvt, nelem(apic->lvt)); nlvt = nelem(apic->lvt); } apic->nlvt = nlvt;