Index: uspace/srv/net/modules.c
===================================================================
--- uspace/srv/net/modules.c	(revision 61ee6df63d7f9f4282a0c5a07c498720f55c7320)
+++ uspace/srv/net/modules.c	(revision 7fb2ce3a39c178e1fe1d067e574c276967abe241)
@@ -55,10 +55,10 @@
 
 int connect_to_service_timeout( services_t need, suseconds_t timeout ){
-	int	phone;
-	int	res;
+	ipcarg_t phone;
+	int res;
 
 	while( true ){
-		res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, ( ipcarg_t * ) & phone );
-		if(( res >= 0 ) && ( phone >= 0 )){
+		res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, & phone );
+		if( res >= 0 ){
 			return phone;
 		}
Index: uspace/srv/net/socket/socket_client.c
===================================================================
--- uspace/srv/net/socket/socket_client.c	(revision 61ee6df63d7f9f4282a0c5a07c498720f55c7320)
+++ uspace/srv/net/socket/socket_client.c	(revision 7fb2ce3a39c178e1fe1d067e574c276967abe241)
@@ -541,5 +541,6 @@
 	socket_ref		new_socket;
 	aid_t			message_id;
-	int				result;
+	ipcarg_t		ipc_result;
+	int			result;
 	ipc_call_t		answer;
 
@@ -592,5 +593,6 @@
 	ipc_data_read_start( socket->phone, cliaddr, * addrlen );
 	fibril_rwlock_write_unlock( & socket_globals.lock );
-	async_wait_for( message_id, ( ipcarg_t * ) & result );
+	async_wait_for( message_id, & ipc_result );
+	result = (int) ipc_result;
 	if( result > 0 ){
 		if( result != socket_id ){
@@ -734,5 +736,6 @@
 	socket_ref		socket;
 	aid_t			message_id;
-	int				result;
+	ipcarg_t		ipc_result;
+	int			result;
 	size_t			fragments;
 	size_t *		lengths;
@@ -793,5 +796,6 @@
 		}
 	}
-	async_wait_for( message_id, ( ipcarg_t * ) & result );
+	async_wait_for( message_id, & ipc_result );
+	result = (int) ipc_result;
 	// if successful
 	if( result == EOK ){
Index: uspace/srv/net/structures/packet/packet_remote.c
===================================================================
--- uspace/srv/net/structures/packet/packet_remote.c	(revision 61ee6df63d7f9f4282a0c5a07c498720f55c7320)
+++ uspace/srv/net/structures/packet/packet_remote.c	(revision 7fb2ce3a39c178e1fe1d067e574c276967abe241)
@@ -101,9 +101,9 @@
 	ERROR_DECLARE;
 
-	packet_id_t	packet_id;
+	ipcarg_t packet_id;
 	ipcarg_t size;
 	packet_t packet;
 
-	if( ERROR_OCCURRED( async_req_4_2( phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, ( ipcarg_t * ) & packet_id, & size ))){
+	if( ERROR_OCCURRED( async_req_4_2( phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, & packet_id, & size ))){
 		return NULL;
 	}
@@ -120,9 +120,9 @@
 	ERROR_DECLARE;
 
-	packet_id_t	packet_id;
+	ipcarg_t	packet_id;
 	ipcarg_t	size;
 	packet_t	packet;
 
-	if( ERROR_OCCURRED( async_req_1_2( phone, NET_PACKET_CREATE_1, content, ( ipcarg_t * ) & packet_id, & size ))){
+	if( ERROR_OCCURRED( async_req_1_2( phone, NET_PACKET_CREATE_1, content, & packet_id, & size ))){
 		return NULL;
 	}
