main: fix the check on inet_pton return value because it returns 1 on success.