convert masked ip to unsigned int, then compare

I simplify the code, to compare two uint more clearly by using "i>>>0".

I have done a simple test to make sure the algorithm right. You can try it. ;)