src: deduplicate find_proto function

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
4 files changed