Index: uspace/console/console.c
===================================================================
--- uspace/console/console.c	(revision 74359c6cef73d72aaa161e0ca5c0c3ddd955e4bc)
+++ uspace/console/console.c	(revision c738d657d3d585f90fca437b475d4589b00e50be)
@@ -87,5 +87,5 @@
 						 * with framebufer used for
 						 * faster virtual console
-						 *switching */
+						 * switching */
 
 static int kernel_pixmap = -1;	/**< Number of fb pixmap, where kernel
@@ -98,7 +98,7 @@
 static int find_free_connection(void) 
 {
-	int i = 0;
-	
-	for (i=0; i < CONSOLE_COUNT; i++) {
+	int i;
+	
+	for (i = 0; i < CONSOLE_COUNT; i++) {
 		if (!connections[i].used)
 			return i;
@@ -149,6 +149,6 @@
 	switch (key) {
 	case '\n':
-		scr->position_y += 1;
-		scr->position_x =  0;
+		scr->position_y++;
+		scr->position_x = 0;
 		break;
 	case '\r':
@@ -179,5 +179,5 @@
 		scr->position_y = scr->size_y - 1;
 		screenbuffer_clear_line(scr, scr->top_line);
-		scr->top_line = (scr->top_line+1) % scr->size_y;
+		scr->top_line = (scr->top_line + 1) % scr->size_y;
 		if (console == active_console)
 			async_msg(fb_info.phone, FB_SCROLL, 1);
@@ -264,6 +264,6 @@
 		for (i = 0; i < conn->screenbuffer.size_x; i++)
 			for (j = 0; j < conn->screenbuffer.size_y; j++) 
-				interbuffer[i + j * conn->screenbuffer.size_x]
-					= *get_field_at(&(conn->screenbuffer),
+				interbuffer[i + j * conn->screenbuffer.size_x] =
+					*get_field_at(&(conn->screenbuffer),
 					i, j);
 		/* This call can preempt, but we are already at the end */
@@ -389,5 +389,5 @@
 	
 	/* Accept the connection */
-	ipc_answer_fast(iid,0,0,0);
+	ipc_answer_fast(iid, 0, 0, 0);
 
 	while (1) {
@@ -442,5 +442,5 @@
 			arg1 = IPC_GET_ARG1(call);
 			arg2 = IPC_GET_ARG2(call);
-			screenbuffer_set_style(&conn->screenbuffer,arg1, arg2);
+			screenbuffer_set_style(&conn->screenbuffer, arg1, arg2);
 			if (consnum == active_console)
 				set_style_col(arg1, arg2);
@@ -485,20 +485,20 @@
 	/* Connect to keyboard driver */
 
-	while ((kbd_phone = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0))
-		< 0) {
+	kbd_phone = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0);
+	while (kbd_phone < 0) {
 		usleep(10000);
+		kbd_phone = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0);
 	}
 	
 	if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, &phonehash) != 0)
-		{
 		return -1;
-	}
 	async_new_connection(phonehash, 0, NULL, keyboard_events);
 	
 	/* Connect to framebuffer driver */
 	
-	while ((fb_info.phone = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0))
-		< 0) {
+	fb_info.phone = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0);
+	while (fb_info.phone < 0) {
 		usleep(10000);
+		fb_info.phone = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0);
 	}
 	
@@ -511,5 +511,5 @@
 	async_req(fb_info.phone, FB_FLUSH, 0, NULL);
 	/* Enable double buffering */
-	async_msg_2(fb_info.phone, FB_VIEWPORT_DB, (sysarg_t)-1, 1);
+	async_msg_2(fb_info.phone, FB_VIEWPORT_DB, (sysarg_t) -1, 1);
 	
 	async_req_2(fb_info.phone, FB_GET_CSIZE, 0, 0, &(fb_info.rows),
@@ -530,5 +530,5 @@
 		if (screenbuffer_init(&(connections[i].screenbuffer),
 			fb_info.cols, fb_info.rows) == NULL) {
-			/*FIXME: handle error */
+			/* FIXME: handle error */
 			return -1;
 		}
@@ -536,7 +536,8 @@
 	connections[KERNEL_CONSOLE].used = 1;
 	
-	if ((interbuffer = mmap(NULL, sizeof(keyfield_t) * fb_info.cols *
-		fb_info.rows, PROTO_READ | PROTO_WRITE, MAP_ANONYMOUS |
-		MAP_PRIVATE, 0, 0)) != NULL) {
+	interbuffer = mmap(NULL,
+		sizeof(keyfield_t) * fb_info.cols * fb_info.rows,
+		PROTO_READ | PROTO_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
+	if (!interbuffer) {
 		if (async_req_3(fb_info.phone, IPC_M_AS_AREA_SEND, (ipcarg_t)
 			interbuffer, 0, AS_AREA_READ, NULL, NULL, NULL) != 0) {
@@ -547,5 +548,5 @@
 	}
 
-	curs_goto(0,0);
+	curs_goto(0, 0);
 	curs_visibility(connections[active_console].screenbuffer.is_cursor_visible);
 
Index: uspace/console/console.h
===================================================================
--- uspace/console/console.h	(revision 74359c6cef73d72aaa161e0ca5c0c3ddd955e4bc)
+++ uspace/console/console.h	(revision c738d657d3d585f90fca437b475d4589b00e50be)
@@ -50,7 +50,5 @@
 
 #endif
-
  
 /** @}
  */
-
Index: uspace/console/gcons.h
===================================================================
--- uspace/console/gcons.h	(revision 74359c6cef73d72aaa161e0ca5c0c3ddd955e4bc)
+++ uspace/console/gcons.h	(revision c738d657d3d585f90fca437b475d4589b00e50be)
@@ -49,3 +49,2 @@
 /** @}
  */
-
Index: uspace/console/screenbuffer.c
===================================================================
--- uspace/console/screenbuffer.c	(revision 74359c6cef73d72aaa161e0ca5c0c3ddd955e4bc)
+++ uspace/console/screenbuffer.c	(revision c738d657d3d585f90fca437b475d4589b00e50be)
@@ -37,5 +37,7 @@
 #include <unistd.h>
 
-/** Store one character to screenbuffer. Its position is determined by scr->position_x and scr->position_y.
+/** Store one character to screenbuffer. Its position is determined by
+ * scr->position_x and scr->position_y.
+ *
  * @param scr	screenbuffer
  * @param c	stored character
@@ -59,5 +61,6 @@
 screenbuffer_t *screenbuffer_init(screenbuffer_t *scr, int size_x, int size_y) 
 {
-	if ((scr->buffer = (keyfield_t *)malloc(sizeof(keyfield_t) * size_x * size_y)) == NULL) {
+	scr->buffer = (keyfield_t *) malloc(sizeof(keyfield_t) * size_x * size_y);
+	if (!scr->buffer) {
 		return NULL;
 	}
@@ -100,6 +103,6 @@
 	
 	for (i = 0; i < scr->size_x; i++) {
-		scr->buffer[i + line*scr->size_x].character = ' ';
-		scr->buffer[i + line*scr->size_x].style = scr->style;
+		scr->buffer[i + line * scr->size_x].character = ' ';
+		scr->buffer[i + line * scr->size_x].style = scr->style;
 	}
 }
@@ -143,3 +146,2 @@
 /** @}
  */
-
