Remove unused detrius. Constify
Remove unused field
Accept noncheck of strncpy() return value
General polishing + constification
Remove unused field
Fix a potential use of an unintialized stack variable.

Constification

Constification.