[libvirt] [PATCH 4/8] factor common code in virHashAddEntry and virHashUpdateEntry