Branch: Tag:

2014-12-04

2014-12-04 19:26:00 by Martin Nilsson <nilsson@opera.com>

mallocs nowdays return void*, so no need to case.

516:    {    struct buffer ob = *initial;    int offset2 = read_uint( buff ); -  struct tile *tile = (struct tile *)xalloc(sizeof(struct tile)); +  struct tile *tile = xalloc(sizeof(struct tile));    read_data( &ob, offset );    if(last_tile)    last_tile->next = tile;
568:    tmp = read_property( buff );    if(tmp.type)    { -  struct property *s = (struct property *)xalloc(sizeof(struct property)); +  struct property *s = xalloc(sizeof(struct property));    *s = tmp;    s->next = res.first_property;    res.first_property = s;
605:    tmp = read_property( buff );    if(tmp.type)    { -  struct property *s =(struct property *)xalloc( sizeof(struct property )); +  struct property *s = xalloc( sizeof(struct property ));    *s = tmp;    s->next = res.first_property;    res.first_property = s;
644:    tmp = read_property( buff );    if(tmp.type)    { -  struct property *s=(struct property *)xalloc( sizeof(struct property )); +  struct property *s=xalloc( sizeof(struct property ));    *s = tmp;    s->next = res.first_property;    res.first_property = s;
657:    if(lm_offset)    {    struct buffer loffset = *initial; -  struct layer_mask *m=(struct layer_mask *)xalloc(sizeof(struct layer_mask)); +  struct layer_mask *m=xalloc(sizeof(struct layer_mask));    res.mask = m;    read_data( &loffset, lm_offset );    MEMSET(m, 0, sizeof( struct layer_mask ));
712:    tmp = read_property( data );    if(tmp.type)    { -  struct property *s= (struct property *)xalloc( sizeof(struct property )); +  struct property *s=xalloc( sizeof(struct property ));    *s = tmp;    s->next = res.first_property;    res.first_property = s;
727:    tmp = read_layer( &layer_data, &initial );    if( tmp.width && tmp.height )    { -  struct layer *s = (struct layer *)xalloc( sizeof(struct layer)); +  struct layer *s = xalloc( sizeof(struct layer));    *s = tmp;    s->next = res.first_layer;    res.first_layer = s;
742:    tmp = read_channel( &channel_data, &initial );    if( tmp.width && tmp.height )    { -  struct channel *s = (struct channel *)xalloc( sizeof(struct channel)); +  struct channel *s = xalloc( sizeof(struct channel));    *s = tmp;    s->next = res.first_channel;    res.first_channel = s;
1239:    int i;    od.s = NULL;    od.len = eheight*ewidth*bpp; /* Max and only size, really */ -  df = (char *)(od.str = (unsigned char *)xalloc( eheight*ewidth*bpp+1 )); +  df = (char *)(od.str = xalloc( eheight*ewidth*bpp+1 ));    d = od;       for(i=0; i<bpp; i++)