REFACTOR: Code formatting.

Thanks Moshe Kaplan for the bug report and original fix.

This is a slight simplification. Test for content length being >= INT_MAX, then can be assured that size + 1 will never be zero.

Fix few coding standard issues with old error messages while we're at it.