gerrit: use unique buffer names
Revert "gerrit: remove unused function"

This reverts commit a9c62fa6d63d4fce4687f6c8e4e353c65143a35c.