From c46ae27c3b24c92fcb4cf8723366bc5e61ae05b3 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 11 Dec 2013 00:53:25 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- planner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planner.c b/planner.c index 08e7f9716..339801d1f 100644 --- a/planner.c +++ b/planner.c @@ -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; -- cgit v1.2.3-70-g09d2