301 redirect for affiliate links?

A piece of software that I inherited allows affiliate links; when an affiliate link is used (for example, [noparse]http://example.com/?aff=123[/noparse]), the software uses the PHP header() function to redirect the browser back to the same page ([noparse]http://example.com[/noparse]).

That’s a 302 redirect, if I’m not mistaken. Is there any SEO (or other) benefit in forcing this to be a 301 redirect?