Date: Mon, 25 May 1998 19:45:04 -0700 (PDT) From: "Jonathan M. Bresler" <jmb> To: jmb@FreeBSD.ORG (Jonathan M. Bresler) Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: Re: cvs commit: src/sys/i386/isa if_zp.c Message-ID: <199805260245.TAA01766@hub.freebsd.org> In-Reply-To: <199805260228.TAA06115@freefall.freebsd.org> from "Jonathan M. Bresler" at "May 25, 98 07:28:20 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
this change is not needed in -stable. "i" was shadowed(?) in -stable. when the name was changed to "j" the problem arose. from stable: { short tmp_addr[3]; int i; for (i = 0; i < 3; i++) { tmp_addr[i] = htons(read_eeprom_data(BASE, i)); } bcopy(tmp_addr, sc->arpcom.ac_enaddr, 6); } from current before the fix: { short tmp_addr[3]; int j; for (j = 0; j < 3; j++) { tmp_addr[i] = htons(read_eeprom_data(BASE, j)); } bcopy(tmp_addr, sc->arpcom.ac_enaddr, 6); } ouch! jmb ps. the fix was changing "tmp_addr[i]" to "tmp_addr[j]". Jonathan M. Bresler wrote: > jmb 1998/05/25 19:28:20 PDT > > Modified files: > sys/i386/isa if_zp.c > Log: > code was using wrong temporary variable "i", in place of "j". > i contains the contents of the EP_W0_CONFIG_CTRL register. > i was being used as the array index into an array on the stack. > > j is initialized to 0 as it should be. > > PR: kern/6757 > Reviewed by: jmb > Submitted by: Stephane E. Potvin <sepotvin@videotron.ca> > > Revision Changes Path > 1.47 +2 -2 src/sys/i386/isa/if_zp.c > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805260245.TAA01766>