Match sizeof with pointer type

More to get clang-scan to quiet down that for the unlikely event that
unsigned int and int is different sizes.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2013-12-11 00:53:25 +01:00 committed by Dirk Hohndel
parent 6c0865c532
commit c46ae27c3b

View file

@ -438,11 +438,11 @@ static unsigned int *sort_stops(unsigned int *dstops, int dnr, struct gaschanges
{
int i, gi, di;
int total = dnr + gnr;
unsigned int *stoplevels = malloc(total * sizeof(int));
unsigned int *stoplevels = malloc(total * sizeof(unsigned int));
/* no gaschanges */
if (gnr == 0) {
memcpy(stoplevels, dstops, dnr * sizeof(int));
memcpy(stoplevels, dstops, dnr * sizeof(unsigned int));
return stoplevels;
}
i = total - 1;