On Mon, Oct 31, 2011 at 01:42:01AM +0100, Simon Wunderlich wrote:
Hey Antonio,
I don't quite understand what this patch is good for - it generalises the function, but does not use the function at another point. So what it is good for (next to add more complexity to batman ;] ).
Furthermore it counts the changes and adds it to num_local_tt, is there a bug fix hidden in this patch somewhere? :)
No hidden bug-fix here :) This patch aims to generalise the tt_local_reset_flags() function only. As I discussed with Sven on IRC, this function could be quite confusing, because its name suggests that it can be used either for other purposes, but this is not true: it can only be used as it is now in the code.
Therefore this patch wants to generalise it enough in order to be eventually used elsewhere.
The increment of tt_local_num is actually done inside the function and it is useful only for the use case proposed in the current code. To generalise the function I had to move the increment outside (somebody else could want to flip a certain flag without affecting the local counter :-) ).
IMHO this patch is not strictly needed, but it would clean the code up (Until it doesn't add any complexity :P)
Cheers,