libc/stdlib: Minor cleanups to code originating in NetBSD

Mostly ANSIfication and typos.

Obtained from:	NetBSD
MFC after:	5 days