summaryrefslogtreecommitdiffhomepage
path: root/src/blitter
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-05-11 12:16:50 -0400
committermidipix <writeonce@midipix.org>2016-05-14 07:18:26 -0400
commitd8a833cf3e76a8389c3e621cc7c9958c3eb866b7 (patch)
tree05280c47c385d051ed2560eb80805379b16e0ea8 /src/blitter
parent858b955da608a5bca2c75651bb58137e7cad850c (diff)
downloadntapi-d8a833cf3e76a8389c3e621cc7c9958c3eb866b7.tar.bz2
ntapi-d8a833cf3e76a8389c3e621cc7c9958c3eb866b7.tar.xz
__blt_popcount(): properly handle signedness.
Diffstat (limited to 'src/blitter')
-rw-r--r--src/blitter/ntapi_blt_alloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blitter/ntapi_blt_alloc.c b/src/blitter/ntapi_blt_alloc.c
index e010441..52397d5 100644
--- a/src/blitter/ntapi_blt_alloc.c
+++ b/src/blitter/ntapi_blt_alloc.c
@@ -15,7 +15,8 @@
static int __blt_popcount(uintptr_t mask)
{
/* todo: check cpuid, use at_popcount */
- int i,ret;
+ uintptr_t i;
+ int ret;
for (i=0,ret=0; i<8*sizeof(uintptr_t); i++)
if (mask & ((uintptr_t)1<<i))