Coding style fixes

- opening braces are on the same line as the if statement
- opening braces are not on the same line as the function name
- space between for/while/if and opening parenthesis

Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
index 89ce38c..d12a8f4 100644
--- a/ivi-shell/ivi-layout-transition.c
+++ b/ivi-shell/ivi-layout-transition.c
@@ -229,7 +229,7 @@
 	struct ivi_layout *layout = get_instance();
 
 	remove_transition(layout, transition);
-	if(transition->destroy_func)
+	if (transition->destroy_func)
 		transition->destroy_func(transition);
 	free(transition);
 }
@@ -663,7 +663,7 @@
 {
 	struct move_layer_data *data = transition->private_data;
 
-	if(data->destroy_func)
+	if (data->destroy_func)
 		data->destroy_func(transition->user_data);
 
 	free(data);
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 2974bb7..95b1671 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -704,7 +704,7 @@
 	int32_t configured = 0;
 
 	wl_list_for_each(ivisurf, &layout->surface_list, link) {
-		if(ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_DEFAULT) {
+		if (ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_DEFAULT) {
 			dest_x = ivisurf->prop.dest_x;
 			dest_y = ivisurf->prop.dest_y;
 			dest_width = ivisurf->prop.dest_width;
@@ -717,7 +717,7 @@
 							       ivisurf->pending.prop.dest_height,
 							       ivisurf->pending.prop.transition_duration);
 
-			if(ivisurf->pending.prop.visibility) {
+			if (ivisurf->pending.prop.visibility) {
 				ivi_layout_transition_visibility_on(ivisurf, ivisurf->pending.prop.transition_duration);
 			} else {
 				ivi_layout_transition_visibility_off(ivisurf, ivisurf->pending.prop.transition_duration);
@@ -731,7 +731,7 @@
 			ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
 			ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
 
-		} else if(ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY){
+		} else if (ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY) {
 			dest_x = ivisurf->prop.dest_x;
 			dest_y = ivisurf->prop.dest_y;
 			dest_width = ivisurf->prop.dest_width;
@@ -753,9 +753,9 @@
 			ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
 			ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
 
-		} else if(ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY){
+		} else if (ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY) {
 			configured = 0;
-			if(ivisurf->pending.prop.visibility) {
+			if (ivisurf->pending.prop.visibility) {
 				ivi_layout_transition_visibility_on(ivisurf, ivisurf->pending.prop.transition_duration);
 			} else {
 				ivi_layout_transition_visibility_off(ivisurf, ivisurf->pending.prop.transition_duration);
@@ -797,9 +797,9 @@
 	struct ivi_layout_surface *next     = NULL;
 
 	wl_list_for_each(ivilayer, &layout->layer_list, link) {
-		if(ivilayer->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_LAYER_MOVE) {
+		if (ivilayer->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_LAYER_MOVE) {
 			ivi_layout_transition_move_layer(ivilayer, ivilayer->pending.prop.dest_x, ivilayer->pending.prop.dest_y, ivilayer->pending.prop.transition_duration);
-		} else if(ivilayer->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_LAYER_FADE) {
+		} else if (ivilayer->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_LAYER_FADE) {
 			ivi_layout_transition_fade_layer(ivilayer,ivilayer->pending.prop.is_fade_in,
 							 ivilayer->pending.prop.start_alpha,ivilayer->pending.prop.end_alpha,
 							 NULL, NULL,
@@ -845,7 +845,7 @@
 			wl_list_init(&ivilayer->order.surface_list);
 			wl_list_for_each(ivisurf, &ivilayer->pending.surface_list,
 					 pending.link) {
-				if(!wl_list_empty(&ivisurf->order.link)){
+				if (!wl_list_empty(&ivisurf->order.link)) {
 					wl_list_remove(&ivisurf->order.link);
 					wl_list_init(&ivisurf->order.link);
 				}
@@ -940,7 +940,7 @@
 static void
 commit_transition(struct ivi_layout* layout)
 {
-	if(wl_list_empty(&layout->pending_transition_list)){
+	if (wl_list_empty(&layout->pending_transition_list)) {
 		return;
 	}
 
@@ -1507,7 +1507,7 @@
 
 	length = wl_list_length(&layout->screen_list);
 
-	if (length != 0){
+	if (length != 0) {
 		/* the Array must be free by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_screen *));
 		if (*ppArray == NULL) {
@@ -1541,7 +1541,7 @@
 
 	length = wl_list_length(&ivilayer->screen_list);
 
-	if (length != 0){
+	if (length != 0) {
 		/* the Array must be free by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_screen *));
 		if (*ppArray == NULL) {
@@ -1574,7 +1574,7 @@
 
 	length = wl_list_length(&layout->layer_list);
 
-	if (length != 0){
+	if (length != 0) {
 		/* the Array must be free by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
 		if (*ppArray == NULL) {
@@ -1608,7 +1608,7 @@
 
 	length = wl_list_length(&iviscrn->order.layer_list);
 
-	if (length != 0){
+	if (length != 0) {
 		/* the Array must be free by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
 		if (*ppArray == NULL) {
@@ -1642,7 +1642,7 @@
 
 	length = wl_list_length(&ivisurf->layer_list);
 
-	if (length != 0){
+	if (length != 0) {
 		/* the Array must be free by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
 		if (*ppArray == NULL) {
@@ -1676,7 +1676,7 @@
 
 	length = wl_list_length(&layout->surface_list);
 
-	if (length != 0){
+	if (length != 0) {
 		/* the Array must be free by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_surface *));
 		if (*ppArray == NULL) {
@@ -2707,7 +2707,7 @@
 {
 	struct weston_view *tmpview = NULL;
 
-	if(surface == NULL)
+	if (surface == NULL)
 		return NULL;
 
 	wl_list_for_each(tmpview, &surface->surface->views, surface_link)
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 808e426..1720705 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -235,7 +235,7 @@
 	layout_surface = ivi_layout_surface_create(weston_surface, id_surface);
 
 	/* check if id_ivi is already used for wl_surface*/
-	if (layout_surface == NULL){
+	if (layout_surface == NULL) {
 		wl_resource_post_error(resource,
 				       IVI_APPLICATION_ERROR_IVI_ID,
 				       "surface_id is already assigned "