[Coding Standards] Fix sample code logic
Merge pull request #3094 from bicpi/fix_coding_standards_sample_code

[Coding Standards] Fix sample code logic