hlr: Reduce code duplication by using template

Change-Id: I7dcf0d27144e5dcf29babcb679ca9ef04b1f46a3
1 file changed