WUtil: changed order for null pointer check in array functions (Coverity #72806,...
commit662b83769a7862a649315803468f16108c62dfdd
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 15 Nov 2014 18:40:29 +0000 (15 19:40 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 23 Nov 2014 22:42:18 +0000 (23 22:42 +0000)
tree7c058d95d167ea94ac978ff0a93a3cca89bc7e74
parent40139e208be39df0a3b212bebb6b26ea9dc4c91e
WUtil: changed order for null pointer check in array functions (Coverity #72806, #72807, #72819)

As pointed by Coverity, there were some null pointer checks that had been
misplaced, due to a pointer dereference present in a preceding check. This
had been fixed by adding another null check in the check, making a
duplicate check.

This patch moves the null pointer check in first place, and remove the
pointer check from the range check to separate the pointer check on one
side and the range check on the other side.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
WINGs/array.c