Fixed channel code sample to not use a pointer

Kamil Kisiel made a good point to not use a pointer in this sample code.