Fix the return code check for ParseIP.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Merge pull request #259 from mrunalp/fix_parse_ip_rc

Fix the return code check for ParseIP.