network: more asserts to shut up scan-build