Patches for Code cleanup for check_tcp [sf#1208098] [#458]