replace all instances of %i with %d to match OpenBSD standards
more %i -> %d
Merge branch 'master' into portable
remove useless cast
Merge branch 'master' into portable