explicitly mark some variables as const
Add missing braces.

Submitted by:	Sascha Wildner <saw online de>
Obtained from:	DragonFly
MFC after:	1 week