Silented pointer to int warnings with casting
Remove unused variable on initSrv
Make initSrv return -1 on svc_connectToPort error
Add else return to exitSrv (could reach the end without returning)