[z2216] Fix some issues shown by Cppcheck

(based on commit [12313] - cd84dcb)

(based on commit [s1850] - f66c5c4)