struct debug_flush_buf *fbuf = *dst;
if (pipe_reference(&(*dst)->reference, &src->reference)) {
- if (fbuf->map_frame)
- FREE(fbuf->map_frame);
+ FREE(fbuf->map_frame);
FREE(fbuf);
}
{
debug_flush_buf_reference(&item->fbuf, NULL);
- if (item->ref_frame)
- FREE(item->ref_frame);
+ FREE(item->ref_frame);
FREE(item);
}
fbuf->mapped_sync = FALSE;
fbuf->mapped = FALSE;
- if (fbuf->map_frame) {
- FREE(fbuf->map_frame);
- fbuf->map_frame = NULL;
- }
+ FREE(fbuf->map_frame);
+ fbuf->map_frame = NULL;
pipe_mutex_unlock(fbuf->mutex);
}
FREE(ifs->decl);
ifs->decl = NULL;
- if (ifs->program) {
- FREE(ifs->program);
- ifs->program = NULL;
- FREE((struct tgsi_token *)ifs->state.tokens);
- ifs->state.tokens = NULL;
- }
+ FREE(ifs->program);
+ ifs->program = NULL;
+ FREE((struct tgsi_token *)ifs->state.tokens);
+ ifs->state.tokens = NULL;
ifs->program_len = 0;
ifs->decl_len = 0;
cur_size * sizeof(new_types[0]),
new_size * sizeof(new_types[0]));
if (!new_buf || !new_types) {
- if (new_buf)
- FREE(new_buf);
- if (new_types)
- FREE(new_types);
+ FREE(new_buf);
+ FREE(new_types);
return -1;
}
nouveau_bufctx_del(&nv50->bufctx_3d);
if (nv50->bufctx)
nouveau_bufctx_del(&nv50->bufctx);
- if (nv50->blit)
- FREE(nv50->blit);
+ FREE(nv50->blit);
FREE(nv50);
return NULL;
}
nouveau_client_del(&dec->client);
- if (dec->mpeg12_bs)
- FREE(dec->mpeg12_bs);
+ FREE(dec->mpeg12_bs);
FREE(dec);
}
nouveau_bufctx_del(&nvc0->bufctx_cp);
if (nvc0->bufctx)
nouveau_bufctx_del(&nvc0->bufctx);
- if (nvc0->blit)
- FREE(nvc0->blit);
+ FREE(nvc0->blit);
FREE(nvc0);
}
return NULL;
if (prog->mem)
nouveau_heap_free(&prog->mem);
- if (prog->code)
- FREE(prog->code); /* may be 0 for hardcoded shaders */
+ FREE(prog->code); /* may be 0 for hardcoded shaders */
FREE(prog->immd_data);
FREE(prog->relocs);
if (prog->type == PIPE_SHADER_COMPUTE && prog->cp.syms)
void
nvc0_blitctx_destroy(struct nvc0_context *nvc0)
{
- if (nvc0->blit)
- FREE(nvc0->blit);
+ FREE(nvc0->blit);
}
void
if (!isa)
return 0;
- if (isa->alu_op2_map)
- free(isa->alu_op2_map);
- if (isa->alu_op3_map)
- free(isa->alu_op3_map);
- if (isa->fetch_map)
- free(isa->fetch_map);
- if (isa->cf_map)
- free(isa->cf_map);
+ free(isa->alu_op2_map);
+ free(isa->alu_op3_map);
+ free(isa->fetch_map);
+ free(isa->cf_map);
free(isa);
return 0;
FREE(tc->transfer_map);
tc->num_maps = 0;
- if (tc->clear_flags)
- FREE(tc->clear_flags);
+ FREE(tc->clear_flags);
tc->clear_flags_size = 0;
}
{
CALLED();
- if (manager)
- FREE(manager);
+ FREE(manager);
}
{
CALLED();
- if (visual)
- FREE(visual);
+ FREE(visual);
}
{
if (tx->num_inst_labels)
FREE(tx->inst_labels);
- if (tx->lconstf)
- FREE(tx->lconstf);
- if (tx->regs.r)
- FREE(tx->regs.r);
+ FREE(tx->lconstf);
+ FREE(tx->regs.r);
FREE(tx);
}
}
nine_shader_variants_free(&This->variant);
- if (This->byte_code.tokens)
- FREE((void *)This->byte_code.tokens); /* const_cast */
+ FREE((void *)This->byte_code.tokens); /* const_cast */
FREE(This->lconstf.data);
FREE(This->lconstf.ranges);
nine_state_clear(state, FALSE);
- if (state->vs_const_f) FREE(state->vs_const_f);
- if (state->ps_const_f) FREE(state->ps_const_f);
+ FREE(state->vs_const_f);
+ FREE(state->ps_const_f);
- if (state->ff.light) FREE(state->ff.light);
+ FREE(state->ff.light);
- if (state->ff.transform) FREE(state->ff.transform);
+ FREE(state->ff.transform);
if (This->state.changed.ps_const_f) {
for (r = This->state.changed.ps_const_f; r->next; r = r->next);
} else if (mode) {
This->mode = malloc(sizeof(D3DDISPLAYMODEEX));
memcpy(This->mode, mode, sizeof(D3DDISPLAYMODEEX));
- } else if (This->mode) {
+ } else {
free(This->mode);
This->mode = NULL;
}
void
NineVertexDeclaration9_dtor( struct NineVertexDeclaration9 *This )
{
- if (This->decls)
- FREE(This->decls);
- if (This->elems)
- FREE(This->elems);
- if (This->usage_map)
- FREE(This->usage_map);
+ FREE(This->decls);
+ FREE(This->elems);
+ FREE(This->usage_map);
NineUnknown_dtor(&This->base);
}
}
nine_shader_variants_free(&This->variant);
- if (This->byte_code.tokens)
- FREE((void *)This->byte_code.tokens); /* const_cast */
+ FREE((void *)This->byte_code.tokens); /* const_cast */
FREE(This->lconstf.data);
FREE(This->lconstf.ranges);
return rep->handle;
out_fail_create:
- if (region)
- FREE(region);
+ FREE(region);
return SVGA3D_INVALID_ID;
}
if (needs_unref)
vmw_ioctl_surface_destroy(vws, *handle);
out_fail_req:
- if (region)
- FREE(region);
+ FREE(region);
return ret;
}
v->_float = strToF (string, &tail);
break;
case DRI_STRING:
- if (v->_string)
- free (v->_string);
+ free (v->_string);
v->_string = strndup(string, STRING_CONF_MAXLEN);
return GL_TRUE;
}
set_label(struct gl_context *ctx, char **labelPtr, const char *label,
int length, const char *caller)
{
- if (*labelPtr) {
- /* free old label string */
- free(*labelPtr);
- *labelPtr = NULL;
- }
+ free(*labelPtr);
+ *labelPtr = NULL;
/* set new label string */
if (label) {