Fix integer shift overflow if both tcp_socket and udp_socket are set

Fix Coverity error CID 56878

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>