fix getservby*() with null pointer for protocol argument