I've improved my code scanner, and it has found 26 potential bugs under sys/. Instead of flooding tech-kern@/tech-net@/etc with questions and fixes, I put here a comprehensive list: http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-2