Removed tmpDataPtr variable as is not used.