diff options
author | Anton Lundin <glance@acc.umu.se> | 2013-12-11 00:53:25 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-11 03:13:30 +0100 |
commit | c46ae27c3b24c92fcb4cf8723366bc5e61ae05b3 (patch) | |
tree | 5deba347c98754e109a6dc9c1000628007737ce0 /planner.c | |
parent | 6c0865c532865c2a7ce7a7838a64f6b54394670f (diff) | |
download | subsurface-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |