Index: uspace/lib/c/generic/adt/measured_strings.c
===================================================================
--- uspace/lib/c/generic/adt/measured_strings.c	(revision 3a5d238f556281ba1d6dbd63ee88a350e1350fec)
+++ uspace/lib/c/generic/adt/measured_strings.c	(revision 278b97b19049e8eb0d12124d52808c8deccf5c5e)
@@ -41,5 +41,4 @@
 #include <unistd.h>
 #include <errno.h>
-#include <err.h>
 #include <async.h>
 
@@ -135,6 +134,4 @@
     size_t count)
 {
-	ERROR_DECLARE;
-
 	size_t *lengths;
 	size_t index;
@@ -142,4 +139,5 @@
 	char *next;
 	ipc_callid_t callid;
+	int rc;
 
 	if ((!strings) || (!data) || (count <= 0))
@@ -155,8 +153,8 @@
 		return EINVAL;
 	}
-	if (ERROR_OCCURRED(async_data_write_finalize(callid, lengths,
-	    length))) {
-		free(lengths);
-		return ERROR_CODE;
+	rc = async_data_write_finalize(callid, lengths, length);
+	if (rc != EOK) {
+		free(lengths);
+		return rc;
 	}
 
@@ -187,10 +185,11 @@
 				return EINVAL;
 			}
-			if (ERROR_OCCURRED(async_data_write_finalize(callid,
-			    next, lengths[index]))) {
+			rc = async_data_write_finalize(callid, next,
+			    lengths[index]);
+			if (rc != EOK) {
 				free(*data);
 				free(*strings);
 				free(lengths);
-				return ERROR_CODE;
+				return rc;
 			}
 			(*strings)[index].value = next;
@@ -251,10 +250,9 @@
 int measured_strings_reply(const measured_string_ref strings, size_t count)
 {
-	ERROR_DECLARE;
-
 	size_t *lengths;
 	size_t index;
 	size_t length;
 	ipc_callid_t callid;
+	int rc;
 
 	if ((!strings) || (count <= 0))
@@ -270,7 +268,8 @@
 		return EINVAL;
 	}
-	if (ERROR_OCCURRED(async_data_read_finalize(callid, lengths, length))) {
-		free(lengths);
-		return ERROR_CODE;
+	rc = async_data_read_finalize(callid, lengths, length);
+	if (rc != EOK) {
+		free(lengths);
+		return rc;
 	}
 	free(lengths);
@@ -282,6 +281,8 @@
 				return EINVAL;
 			}
-			ERROR_PROPAGATE(async_data_read_finalize(callid,
-			    strings[index].value, strings[index].length));
+			rc = async_data_read_finalize(callid,
+			    strings[index].value, strings[index].length);
+			if (rc != EOK)
+				return rc;
 		}
 	}
@@ -313,9 +314,8 @@
     size_t count)
 {
-	ERROR_DECLARE;
-
 	size_t *lengths;
 	size_t index;
 	char *next;
+	int rc;
 
 	if ((phone < 0) || (!strings) || (!data) || (count <= 0))
@@ -326,8 +326,9 @@
 		return ENOMEM;
 
-	if (ERROR_OCCURRED(async_data_read_start(phone, lengths,
-	    sizeof(size_t) * (count + 1)))) {
-		free(lengths);
-		return ERROR_CODE;
+	rc = async_data_read_start(phone, lengths,
+	    sizeof(size_t) * (count + 1));
+	if (rc != EOK) {
+		free(lengths);
+		return rc;
 	}
 
@@ -350,10 +351,10 @@
 		(*strings)[index].length = lengths[index];
 		if (lengths[index] > 0) {
-			if (ERROR_OCCURRED(async_data_read_start(phone, next,
-			    lengths[index]))) {
+			rc = async_data_read_start(phone, next, lengths[index]);
+			if (rc != EOK) {
 			    	free(lengths);
 				free(data);
 				free(strings);
-				return ERROR_CODE;
+				return rc;
 			}
 			(*strings)[index].value = next;
@@ -387,8 +388,7 @@
     size_t count)
 {
-	ERROR_DECLARE;
-
 	size_t *lengths;
 	size_t index;
+	int rc;
 
 	if ((phone < 0) || (!strings) || (count <= 0))
@@ -399,8 +399,9 @@
 		return ENOMEM;
 
-	if (ERROR_OCCURRED(async_data_write_start(phone, lengths,
-	    sizeof(size_t) * (count + 1)))) {
-		free(lengths);
-		return ERROR_CODE;
+	rc = async_data_write_start(phone, lengths,
+	    sizeof(size_t) * (count + 1));
+	if (rc != EOK) {
+		free(lengths);
+		return rc;
 	}
 
@@ -409,6 +410,8 @@
 	for (index = 0; index < count; index++) {
 		if (strings[index].length > 0) {
-			ERROR_PROPAGATE(async_data_write_start(phone,
-			    strings[index].value, strings[index].length));
+			rc = async_data_write_start(phone, strings[index].value,
+			    strings[index].length);
+			if (rc != EOK)
+				return rc;
 		}
 	}
