summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-12-11 00:53:25 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-11 03:13:30 +0100
commitc46ae27c3b24c92fcb4cf8723366bc5e61ae05b3 (patch)
tree5deba347c98754e109a6dc9c1000628007737ce0 /planner.c
parent6c0865c532865c2a7ce7a7838a64f6b54394670f (diff)
downloadsubsurface-c46ae27c3b24c92fcb4cf8723366bc5e61ae05b3.tar.gz
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>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c4
1 files 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;