ivi-layout: separate declarations from code

Thanks Pekka for pointing that out.

Signed-off-by: Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Carlos Olmedo Escobar 10 years ago committed by Pekka Paalanen
parent 5ba1e1d137
commit 703f502036
  1. 21
      ivi-shell/ivi-layout-transition.c

@ -327,11 +327,14 @@ create_move_resize_view_transition(
ivi_layout_transition_destroy_func destroy_func, ivi_layout_transition_destroy_func destroy_func,
uint32_t duration) uint32_t duration)
{ {
struct ivi_layout_transition *transition = create_layout_transition(); struct ivi_layout_transition *transition;
struct move_resize_view_data *data;
transition = create_layout_transition();
if (transition == NULL) if (transition == NULL)
return NULL; return NULL;
struct move_resize_view_data *data = malloc(sizeof(*data)); data = malloc(sizeof(*data));
if (data == NULL) { if (data == NULL) {
weston_log("%s: memory allocation fails\n", __func__); weston_log("%s: memory allocation fails\n", __func__);
return NULL; return NULL;
@ -452,11 +455,14 @@ create_fade_view_transition(
ivi_layout_transition_destroy_func destroy_func, ivi_layout_transition_destroy_func destroy_func,
uint32_t duration) uint32_t duration)
{ {
struct ivi_layout_transition *transition = create_layout_transition(); struct ivi_layout_transition *transition;
struct fade_view_data *data;
transition = create_layout_transition();
if (transition == NULL) if (transition == NULL)
return NULL; return NULL;
struct fade_view_data *data = malloc(sizeof(*data)); data = malloc(sizeof(*data));
if (data == NULL) { if (data == NULL) {
weston_log("%s: memory allocation fails\n", __func__); weston_log("%s: memory allocation fails\n", __func__);
return NULL; return NULL;
@ -678,11 +684,14 @@ create_move_layer_transition(
ivi_layout_transition_destroy_user_func destroy_user_func, ivi_layout_transition_destroy_user_func destroy_user_func,
uint32_t duration) uint32_t duration)
{ {
struct ivi_layout_transition *transition = create_layout_transition(); struct ivi_layout_transition *transition;
struct move_layer_data *data;
transition = create_layout_transition();
if (transition == NULL) if (transition == NULL)
return NULL; return NULL;
struct move_layer_data *data = malloc(sizeof(*data)); data = malloc(sizeof(*data));
if (data == NULL) { if (data == NULL) {
weston_log("%s: memory allocation fails\n", __func__); weston_log("%s: memory allocation fails\n", __func__);
return NULL; return NULL;

Loading…
Cancel
Save