Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 3cd95eff08637cef10501ec684a3ff757ab93451)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision 5e9e8b7c4168ebdd3f249c3a32faab354bf2197d)
@@ -41,5 +41,4 @@
 #include <stdio.h>
 #include <str.h>
-#include <err.h>
 #include <ipc/ipc.h>
 #include <ipc/net.h>
@@ -82,5 +81,5 @@
 int nil_initialize(int net_phone)
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	fibril_rwlock_initialize(&nildummy_globals.devices_lock);
@@ -91,10 +90,10 @@
 	nildummy_globals.net_phone = net_phone;
 	nildummy_globals.proto.phone = 0;
-	ERROR_CODE = nildummy_devices_initialize(&nildummy_globals.devices);
+	rc = nildummy_devices_initialize(&nildummy_globals.devices);
 	
 	fibril_rwlock_write_unlock(&nildummy_globals.protos_lock);
 	fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
 	
-	return ERROR_CODE;
+	return rc;
 }
 
@@ -107,24 +106,23 @@
 static void nildummy_receiver(ipc_callid_t iid, ipc_call_t *icall)
 {
-	ERROR_DECLARE;
-
 	packet_t packet;
+	int rc;
 
 	while (true) {
 		switch (IPC_GET_METHOD(*icall)) {
 		case NET_NIL_DEVICE_STATE:
-			ERROR_CODE = nil_device_state_msg_local(0,
+			rc = nil_device_state_msg_local(0,
 			    IPC_GET_DEVICE(icall), IPC_GET_STATE(icall));
-			ipc_answer_0(iid, (ipcarg_t) ERROR_CODE);
+			ipc_answer_0(iid, (ipcarg_t) rc);
 			break;
 		
 		case NET_NIL_RECEIVED:
-			if (ERROR_NONE(packet_translate_remote(
-			    nildummy_globals.net_phone, &packet,
-			    IPC_GET_PACKET(icall)))) {
-				ERROR_CODE = nil_received_msg_local(0,
+			rc = packet_translate_remote(nildummy_globals.net_phone,
+			    &packet, IPC_GET_PACKET(icall));
+			if (rc == EOK) {
+				rc = nil_received_msg_local(0,
 				    IPC_GET_DEVICE(icall), packet, 0);
 			}
-			ipc_answer_0(iid, (ipcarg_t) ERROR_CODE);
+			ipc_answer_0(iid, (ipcarg_t) rc);
 			break;
 		
@@ -155,8 +153,7 @@
 nildummy_device_message(device_id_t device_id, services_t service, size_t mtu)
 {
-	ERROR_DECLARE;
-
 	nildummy_device_ref device;
 	int index;
+	int rc;
 
 	fibril_rwlock_write_lock(&nildummy_globals.devices_lock);
@@ -216,9 +213,10 @@
 	
 	// get hardware address
-	if (ERROR_OCCURRED(netif_get_addr_req(device->phone, device->device_id,
-	    &device->addr, &device->addr_data))) {
+	rc = netif_get_addr_req(device->phone, device->device_id, &device->addr,
+	    &device->addr_data);
+	if (rc != EOK) {
 		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
 		free(device);
-		return ERROR_CODE;
+		return rc;
 	}
 	
@@ -380,6 +378,4 @@
     ipc_call_t *answer, int *answer_count)
 {
-	ERROR_DECLARE;
-	
 	measured_string_ref address;
 	packet_t packet;
@@ -388,4 +384,5 @@
 	size_t suffix;
 	size_t content;
+	int rc;
 	
 	*answer_count = 0;
@@ -399,13 +396,16 @@
 	
 	case NET_NIL_SEND:
-		ERROR_PROPAGATE(packet_translate_remote(
-		    nildummy_globals.net_phone, &packet, IPC_GET_PACKET(call)));
+		rc = packet_translate_remote(nildummy_globals.net_phone,
+		    &packet, IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
 		return nildummy_send_message(IPC_GET_DEVICE(call), packet,
 		    IPC_GET_SERVICE(call));
 	
 	case NET_NIL_PACKET_SPACE:
-		ERROR_PROPAGATE(nildummy_packet_space_message(
-		    IPC_GET_DEVICE(call), &addrlen, &prefix, &content,
-		    &suffix));
+		rc = nildummy_packet_space_message(IPC_GET_DEVICE(call),
+		    &addrlen, &prefix, &content, &suffix);
+		if (rc != EOK)
+			return rc;
 		IPC_SET_ADDR(answer, addrlen);
 		IPC_SET_PREFIX(answer, prefix);
@@ -416,11 +416,13 @@
 	
 	case NET_NIL_ADDR:
-		ERROR_PROPAGATE(nildummy_addr_message(IPC_GET_DEVICE(call),
-		    &address));
+		rc = nildummy_addr_message(IPC_GET_DEVICE(call), &address);
+		if (rc != EOK)
+			return rc;
 		return measured_strings_reply(address, 1);
 	
 	case NET_NIL_BROADCAST_ADDR:
-		ERROR_PROPAGATE(nildummy_addr_message(IPC_GET_DEVICE(call),
-		    &address));
+		rc = nildummy_addr_message(IPC_GET_DEVICE(call), &address);
+		if (rc != EOK)
+			return rc;
 		return measured_strings_reply(address, 1);
 	
@@ -476,9 +478,9 @@
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	ERROR_PROPAGATE(nil_module_start_standalone(nil_client_connection));
-	return EOK;
+	rc = nil_module_start_standalone(nil_client_connection);
+	return rc;
 }
 
