Gerrit Renker <[EMAIL PROTECTED]> wrote: > > size = 0; > sk_for_each(sk2, node, list) > if (++size >= best_size_so_far) > goto next; > best_size_so_far = size; > best = result; > next:; > > > | and this got converted into: > | > | sk_for_each(sk2, node, head) > | if (++size < best_size_so_far) { > | best_size_so_far = size; > | best = result; > | } > | > | Which does something very very different from the original. > ===> Sorry, I fail to see where the two differ. They have the same > postcondition > upon loop exit; sk2, node, size, and head are not referenced anywhere in > the > code that follows.
They're different because the former only updates best_size_so_far after termination while the latter does it from the start. It's like moving the goal-posts while someone's trying to shoot :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html