This cast looks like it should be to `const reg_type *`.