Minor buffer.c style cleanups
Merge pull request #998 from war1025/dev/buffer_cleanup

Minor buffer.c style cleanups