Index: uspace/srv/net/netif/lo/lo.c
===================================================================
--- uspace/srv/net/netif/lo/lo.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/netif/lo/lo.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -64,5 +64,5 @@
 /** Default address length.
  */
-#define DEFAULT_ADDR_LEN	( sizeof( DEFAULT_ADDR ) / sizeof( char ))
+#define DEFAULT_ADDR_LEN	(sizeof(DEFAULT_ADDR) / sizeof(char))
 
 /** Loopback module name.
@@ -80,5 +80,5 @@
  *  @returns EOK otherwise.
  */
-int	change_state_message( device_ref device, device_state_t state );
+int change_state_message(device_ref device, device_state_t state);
 
 /** Creates and returns the loopback network interface structure.
@@ -89,17 +89,19 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	create( device_id_t device_id, device_ref * device );
+int create(device_id_t device_id, device_ref * device);
 
 /** Prints the module name.
  *  @see NAME
  */
-void	module_print_name( void );
-
-int netif_specific_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
+void module_print_name(void);
+
+int netif_specific_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
 	return ENOTSUP;
 }
 
-int netif_get_addr_message( device_id_t device_id, measured_string_ref address ){
-	if( ! address ) return EBADMEM;
+int netif_get_addr_message(device_id_t device_id, measured_string_ref address){
+	if(! address){
+		return EBADMEM;
+	}
 	address->value = str_dup(DEFAULT_ADDR);
 	address->length = DEFAULT_ADDR_LEN;
@@ -107,19 +109,21 @@
 }
 
-int netif_get_device_stats( device_id_t device_id, device_stats_ref stats ){
+int netif_get_device_stats(device_id_t device_id, device_stats_ref stats){
 	ERROR_DECLARE;
 
-	device_ref	device;
-
-	if( ! stats ) return EBADMEM;
-	ERROR_PROPAGATE( find_device( device_id, & device ));
-	memcpy( stats, ( device_stats_ref ) device->specific, sizeof( device_stats_t ));
-	return EOK;
-}
-
-int change_state_message( device_ref device, device_state_t state ){
-	if( device->state != state ){
+	device_ref device;
+
+	if(! stats){
+		return EBADMEM;
+	}
+	ERROR_PROPAGATE(find_device(device_id, &device));
+	memcpy(stats, (device_stats_ref) device->specific, sizeof(device_stats_t));
+	return EOK;
+}
+
+int change_state_message(device_ref device, device_state_t state){
+	if(device->state != state){
 		device->state = state;
-		printf( "State changed to %s\n", ( state == NETIF_ACTIVE ) ? "ACTIVE" : "STOPPED" );
+		printf("State changed to %s\n", (state == NETIF_ACTIVE) ? "ACTIVE" : "STOPPED");
 		return state;
 	}
@@ -127,26 +131,28 @@
 }
 
-int create( device_id_t device_id, device_ref * device ){
-	int	index;
-
-	if( device_map_count( & netif_globals.device_map ) > 0 ){
+int create(device_id_t device_id, device_ref * device){
+	int index;
+
+	if(device_map_count(&netif_globals.device_map) > 0){
 		return EXDEV;
 	}else{
-		* device = ( device_ref ) malloc( sizeof( device_t ));
-		if( !( * device )) return ENOMEM;
-		( ** device ).specific = malloc( sizeof( device_stats_t ));
-		if( ! ( ** device ).specific ){
-			free( * device );
+		*device = (device_ref) malloc(sizeof(device_t));
+		if(!(*device)){
 			return ENOMEM;
 		}
-		null_device_stats(( device_stats_ref )( ** device ).specific );
-		( ** device ).device_id = device_id;
-		( ** device ).nil_phone = -1;
-		( ** device ).state = NETIF_STOPPED;
-		index = device_map_add( & netif_globals.device_map, ( ** device ).device_id, * device );
-		if( index < 0 ){
-			free( * device );
-			free(( ** device ).specific );
-			* device = NULL;
+		(** device).specific = malloc(sizeof(device_stats_t));
+		if(! (** device).specific){
+			free(*device);
+			return ENOMEM;
+		}
+		null_device_stats((device_stats_ref)(** device).specific);
+		(** device).device_id = device_id;
+		(** device).nil_phone = -1;
+		(** device).state = NETIF_STOPPED;
+		index = device_map_add(&netif_globals.device_map, (** device).device_id, * device);
+		if(index < 0){
+			free(*device);
+			free((** device).specific);
+			*device = NULL;
 			return index;
 		}
@@ -155,61 +161,61 @@
 }
 
-int netif_initialize( void ){
-	ipcarg_t	phonehash;
-
-	return REGISTER_ME( SERVICE_LO, & phonehash );
-}
-
-void module_print_name( void ){
-	printf( "%s", NAME );
-}
-
-int netif_probe_message( device_id_t device_id, int irq, uintptr_t io ){
+int netif_initialize(void){
+	ipcarg_t phonehash;
+
+	return REGISTER_ME(SERVICE_LO, &phonehash);
+}
+
+void module_print_name(void){
+	printf("%s", NAME);
+}
+
+int netif_probe_message(device_id_t device_id, int irq, uintptr_t io){
 	ERROR_DECLARE;
 
-	device_ref			device;
+	device_ref device;
 
 	// create a new device
-	ERROR_PROPAGATE( create( device_id, & device ));
+	ERROR_PROPAGATE(create(device_id, &device));
 	// print the settings
-	printf("New device created:\n\tid\t= %d\n", device->device_id );
-	return EOK;
-}
-
-int netif_send_message( device_id_t device_id, packet_t packet, services_t sender ){
+	printf("New device created:\n\tid\t= %d\n", device->device_id);
+	return EOK;
+}
+
+int netif_send_message(device_id_t device_id, packet_t packet, services_t sender){
 	ERROR_DECLARE;
 
-	device_ref	device;
-	size_t		length;
-	packet_t	next;
-	int			phone;
-
-	ERROR_PROPAGATE( find_device( device_id, & device ));
-	if( device->state != NETIF_ACTIVE ){
-		netif_pq_release( packet_get_id( packet ));
+	device_ref device;
+	size_t length;
+	packet_t next;
+	int phone;
+
+	ERROR_PROPAGATE(find_device(device_id, &device));
+	if(device->state != NETIF_ACTIVE){
+		netif_pq_release(packet_get_id(packet));
 		return EFORWARD;
 	}
 	next = packet;
 	do{
-		++ (( device_stats_ref ) device->specific )->send_packets;
-		++ (( device_stats_ref ) device->specific )->receive_packets;
-		length = packet_get_data_length( next );
-		(( device_stats_ref ) device->specific )->send_bytes += length;
-		(( device_stats_ref ) device->specific )->receive_bytes += length;
-		next = pq_next( next );
-	}while( next );
+		++ ((device_stats_ref) device->specific)->send_packets;
+		++ ((device_stats_ref) device->specific)->receive_packets;
+		length = packet_get_data_length(next);
+		((device_stats_ref) device->specific)->send_bytes += length;
+		((device_stats_ref) device->specific)->receive_bytes += length;
+		next = pq_next(next);
+	}while(next);
 	phone = device->nil_phone;
-	fibril_rwlock_write_unlock( & netif_globals.lock );
-	nil_received_msg( phone, device_id, packet, sender );
-	fibril_rwlock_write_lock( & netif_globals.lock );
-	return EOK;
-}
-
-int netif_start_message( device_ref device ){
-	return change_state_message( device, NETIF_ACTIVE );
-}
-
-int netif_stop_message( device_ref device ){
-	return change_state_message( device, NETIF_STOPPED );
+	fibril_rwlock_write_unlock(&netif_globals.lock);
+	nil_received_msg(phone, device_id, packet, sender);
+	fibril_rwlock_write_lock(&netif_globals.lock);
+	return EOK;
+}
+
+int netif_start_message(device_ref device){
+	return change_state_message(device, NETIF_ACTIVE);
+}
+
+int netif_stop_message(device_ref device){
+	return change_state_message(device, NETIF_STOPPED);
 }
 
