uint8_t idx;
/* parse header line: width, height, #colors, #chars */
- if (sscanf(xpm[line], "%d %d %d %d", &width, &height, &colors, &chars) != 4) {
+ if (sscanf(xpm[line], "%u %u %u %u",
+ &width, &height, &colors, &chars) != 4) {
fprintf(stderr, "%s: header parse error: \"%s\"\n",
__FUNCTION__, xpm[line]);
return NULL;
QEMUCursor *c;
int datasize = width * height * sizeof(uint32_t);
- c = qemu_mallocz(sizeof(QEMUCursor) + datasize);
+ c = g_malloc0(sizeof(QEMUCursor) + datasize);
c->width = width;
c->height = height;
c->refcount = 1;
c->refcount--;
if (c->refcount)
return;
- qemu_free(c);
+ g_free(c);
}
int cursor_get_mono_bpl(QEMUCursor *c)