coverity#1247617 there is nothing to do if width is 0

Change-Id: Iddd877d83d2a3669778282fa8aa9a63dfa850524
correct function name

Change-Id: Ibc3ab15bc830d68bf9d3d1d9ac9595d82c7fb6aa
coverity#1209374 avoid division by 0

Change-Id: I6728c0f79e0091b88b3269f5b8b25d27c82d9761
coverity#735655 avoid division by 0

Change-Id: I5eeb4cbcaa19bdf9bcafc3830447468dd8dc5c8c