use restrict key word where possible

Signed-off-by: Sami Kerola <kerolasa@iki.fi>