coverity#1202771 Operands don't affect result

Change-Id: I6a0228594d31cda252f299cad55469ad02c6b353
trivial cleanups

Change-Id: I50bc7ab36690e572825109de9f0b1bb11d26867f
coverity#705542 Unintentional integer overflow

Change-Id: I87712c71689d45259bc9e4e2f71c92375bc887ea
coverity#984442 Use after free

Change-Id: I28822f6b74cbf8ace8f7a194248840cb401679be
coverity#708811 Unused pointer value

Change-Id: I18ed52cc6c00c5c462629c4fff7804ea22035e3a
coverity#708815 Unused pointer value

Change-Id: Ie58034f0475dc9a876eeb54f3bc6a3c415c3e0a1
coverity#708847 Unused pointer value

Change-Id: Id16ebc576834e418a3bf2d3d6eb3e2545e0aac2b
coverity#708868 Unused pointer value

Change-Id: I5d25f7de37df6fe79bb195e1cb68876fb3b4fcca