w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
A question in ip_append_data

The condition is (page != frag->page), why? can it be replaced by (!frag->page)? I think (page == frag->page) is always true when (!frag->page) is true.

If (page == frag->page) is always true when (!frag->page) is true, (page != frag->page) is false when (!frag->page) is true, and replacing (page != frag->page) by (!frag->page) would be replacing the value false by true.

And if you meant to write that (page != frag->page) is always true when (!frag->page) is true and if that is even right, that is not sufficient for (page != frag->page) to be equivalent to (!frag->page), because (page != frag->page) is not necessarily always false when (!frag->page) is false.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.