clients: Simplify memory allocation with xzalloc()
clients: Simplify memory allocation with xzalloc()

It is redundant to check x*alloc's return value for null pointers, since
they are guaranteed to either return non-NULL or terminate the program.

In cases where we memset the malloc'd memory to 0, we can more
efficiently use the xzalloc() routine.  zalloc looks for opportunities
to return memory chunks that have already been zero'd out, so it can
provide better performance.

This patch addresses this warning, reported by Denis Denisov:

  [clients/window.c:1164] -> [clients/window.c:1166]: (warning) Possible
  null pointer dereference: surface - otherwise it is redundant to check
  it against null.

  [clients/window.c:4513] -> [clients/window.c:4514]: (warning) Possible
  null pointer dereference: surface - otherwise it is redundant to check
  it against null.

Signed-off-by: Bryce Harrington <bdb14cfc1ab8d24e13de84adc40b41ae60c13bd1@osg.samsung.com>
Reviewed-by: Marek Chalupa <a05df156a69ad59faa9af9b666ef78009594c145@gmail.com>

Fantu/compositor-spice,Tarnyko/weston-xdg_surface_present,xorgy/weston,kwm81/weston,sir-murray/weston,mchalupa/weston,giucam/weston,xorgy/weston,mchalupa/weston,krezovic/weston,udoprog/weston,krezovic/weston,jonnylamb/weston,Gnurou/weston,giucam/weston,kwm81/weston,udoprog/weston,eyolfson/weston,Fantu/compositor-spice,Fantu/compositor-spice,sir-murray/weston,jonnylamb/weston,Tarnyko/weston-xdg_surface_present,Gnurou/weston,eyolfson/weston