Fixed variable name error in code example doc

- Changed declaration of buffer header variable in documentation
  code example to use name "buffer" instead of "header" since
  this is the name used throughout the remaining code.