On Fri, 2009-09-11 at 09:52 +0200, Holger Schurig wrote: > Now, if I want to report an -EINVAL for every possibly invalid > scan-request channel, I'd have to do this: > > > If scan-request has freqs: > Loop over all scan-request freqs > Loop over all bands > Loop over all channels > search for freq > if found: > Stick channel to scan request > else: > err = -EINVAL > else: > Loop over all bands > Loop over all channels > Stick channel to scan request > > This is considerable code-bloat for such a seldom-used function. Doesn't seem that bad considering that the inner loop is already in an existing function. > I'd rather do it like this: > > > Loop over all bands > Loop over all channels > If scan-request hasn't this channel freq: continue > Stick channel to scan request > if no channels: > err = -EINVAL > > That's a compromise :-) I guess. I'd still prefer the other way, but it's wext, so I don't really care :) johannes
Attachment:
signature.asc
Description: This is a digitally signed message part