fix two ternary expressions taken wrong

Alexey points fetchIPv4AddressNetworkRow() and
fetchIPv6AddressNetworkRow() return NULL on miss, not FALSE. Update
getIPv4AddressNetworkId() and getIPv6AddressNetworkId() respectively.