mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
dix: fix inttype mismatches in AllocARGBCursor & AllocGlyphCursor
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
aefde94a2d
commit
2285961661
12
dix/cursor.c
12
dix/cursor.c
@@ -366,15 +366,11 @@ AllocGlyphCursor(Font source, unsigned short sourceChar, Font mask, unsigned sho
|
||||
return BadValue;
|
||||
}
|
||||
if (!maskfont) {
|
||||
long n;
|
||||
unsigned char *mskptr;
|
||||
|
||||
n = BitmapBytePad(cm.width) * (long) cm.height;
|
||||
mskptr = mskbits = calloc(1, n);
|
||||
if (!mskptr)
|
||||
size_t n = BitmapBytePad(cm.width) * (long) cm.height;
|
||||
mskbits = calloc(1, n);
|
||||
if (!mskbits)
|
||||
return BadAlloc;
|
||||
while (--n >= 0)
|
||||
*mskptr++ = (unsigned char)~0U;
|
||||
memset(mskbits, 0xFF, n);
|
||||
}
|
||||
else {
|
||||
if (!CursorMetricsFromGlyph(maskfont, maskChar, &cm)) {
|
||||
|
||||
Reference in New Issue
Block a user