Minor cleanup of test.c
tcp.c: Don't exit but return error instead