wmaker: fix size of element given to the 'qsort' function (Coverity #50210)
commit2b65b0416ed22c50a92298c749e867abec45d8ac
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 15 Nov 2014 18:40:57 +0000 (15 19:40 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 23 Nov 2014 22:43:38 +0000 (23 22:43 +0000)
tree00f9084955da9e634fdba05d63ebce4176aeb993
parent2ed24561ffb6c1f79dd3a65a7f9f1beaafd22e16
wmaker: fix size of element given to the 'qsort' function (Coverity #50210)

As pointed by Coverity, the sizeof used was not done on the right type.
This worked because the element was a pointer all pointers types have the
same size in most platforms.

For code maintainability, the code will now take the size from the first
element of the array to be sorted, so that if the structure gets changed
someday the expression will stay valid.

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