network: prepare the code so the VLC functions can return an error code

Open Steve Lhomme requested to merge robUx4/vlc:prepare-negative-network-errors into master

Rather than returning -1 and rely on net_errno "somewhere".

Clean a bit of code on the way.

Merge request reports