Inline redundant variable

variable 'reg' is redundant; inlined.
Merge pull request #1281 from barryvan/patch-2

Inline redundant variable