diff options
author | Josh Cartwright <joshc@ni.com> | 2015-08-31 11:35:32 -0500 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2015-09-17 21:19:47 +0200 |
commit | 8d20bc5511e4ba25efa6750c738399d95a030575 (patch) | |
tree | 013afa357031d79c0b61aa7f6f3d43ee5ccba267 | |
parent | 1d6b1c9d25416a417f5e1f87f00a55029850021c (diff) | |
download | rt-tests-8d20bc5511e4ba25efa6750c738399d95a030575.tar.gz |
cyclictest: use correct type when allocating cpu bitmask size
On any sane platform sizeof(long) == sizeof(unsigned long), so this
does not actually fix a real bug, but the code should at least be
consistent.
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | src/cyclictest/rt_numa.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cyclictest/rt_numa.h b/src/cyclictest/rt_numa.h index c1b3f94..ec29943 100644 --- a/src/cyclictest/rt_numa.h +++ b/src/cyclictest/rt_numa.h @@ -235,7 +235,7 @@ static inline struct bitmask* rt_numa_parse_cpustring(const char* s, * max_cpus bits */ int nlongs = (max_cpus+BITS_PER_LONG-1)/BITS_PER_LONG; - mask->maskp = calloc(nlongs, sizeof(long)); + mask->maskp = calloc(nlongs, sizeof(unsigned long)); if (mask->maskp) { mask->maskp[cpu/BITS_PER_LONG] |= (1UL << (cpu % BITS_PER_LONG)); |