Fixing problems with pointer parameters