On 05.11.2010 08:53, Michael Karcher wrote: > Am Donnerstag, den 04.11.2010, 05:20 +0100 schrieb Carl-Daniel > Hailfinger: > >>> Or, wait a moment! Do you see some similarity between the assignment in >>> the if and the assignment before the break? Yes! The expressions are >>> identical. So: remove the first_len assignment before the break, you >>> also don't need to clear a flag in that block, just break. And then you >>> do the first_len assignment if the variable till now known as result is >>> set. The logic is that the loop always terminates at the end of the >>> region to write. Which might either be because of the loop end condition >>> or the matching compare - who cares, actually. >>> > > >> I actually had that cleanup included in an earlier partial write patch, >> but decided to scratch it because I was still searching for the bug in >> the partial write patch back then. >> > > The special suggested modification is not in, but I like the new version > already much better. >
My bad, I had misunderstood your original review. Will post a patch on top of this which addresses the issue you mentioned. > Acked-by: Michael Karcher <[email protected]> > Thanks, committed in r1225. Regards, Carl-Daniel -- http://www.hailfinger.org/ _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
