Re: ATM bug found

2006-10-01 Thread Mitchell Blank Jr
chas williams - CONTRACTOR wrote: > still generates a warning from gcc though. The warning is bogus in this case, though -- the only way for "*pcr" to be unset is when alloc_shaper() returns non-zero > + *pcr = 0; You're right, 0 is better than ATM_MAX_PCR here. -Mitch - To unsubscr

Re: ATM bug found

2006-10-01 Thread chas williams - CONTRACTOR
In message <[EMAIL PROTECTED]>,Mitchell Blank Jr writes: >The fix is for alloc_shaper() should really do "*pcr = ATM_MAX_PCR" in >the "if (ubr)" stanza. Chas, want to submit that in the next batch >of patches? i dont think you can do that. pcr gets assigned to .min_pcr and .min_pcr = ATM_MAX_PCR

Re: ATM bug found

2006-10-01 Thread chas williams - CONTRACTOR
In message <[EMAIL PROTECTED]>,Jeff Garzik writes: >If alloc_shaper() argument 'unlimited' is true, then pcr is never >assigned a value. However, the caller of alloc_shaper() always tests >the pcr value, regardless of whether or not 'unlimited' is true. when unlimited is true, this means ubr.

Re: ATM bug found

2006-10-01 Thread Mitchell Blank Jr
(trimmed cc:'s since, IMO, isn't really all that general interest) Jeff Garzik wrote: > drivers/atm/zatm.c: In function ?zatm_open?: > drivers/atm/zatm.c:919: warning: ?pcr? may be used uninitialized in this > function Yeah, looks like a bug. Not very high-impact because: 1. it only results i

ATM bug found

2006-10-01 Thread Jeff Garzik
Unlike 98% of the warnings of this type, this gcc warning does indeed seem to indicate a bug: drivers/atm/zatm.c: In function ‘zatm_open’: drivers/atm/zatm.c:919: warning: ‘pcr’ may be used uninitialized in this function If alloc_shaper() argument 'unlimited' is true, then pcr is never assig