shared: fix a double-initialization issue

'prev' and 'current' are initialized immediately before this statement,
so reinitializing with the same value is not necessary.