Clearing buffer with memset