Index: uspace/lib/bithenge/src/tree.c
===================================================================
--- uspace/lib/bithenge/src/tree.c	(revision 6cd10acfc0149d4728e582f5922234de9820fc86)
+++ uspace/lib/bithenge/src/tree.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -86,10 +86,10 @@
 } get_for_each_data_t;
 
-static int get_for_each_func(bithenge_node_t *key, bithenge_node_t *value,
+static errno_t get_for_each_func(bithenge_node_t *key, bithenge_node_t *value,
     void *raw_data)
 {
 	get_for_each_data_t *data = (get_for_each_data_t *)raw_data;
 	bool equal;
-	int rc = bithenge_node_equal(&equal, key, data->key);
+	errno_t rc = bithenge_node_equal(&equal, key, data->key);
 	bithenge_node_dec_ref(key);
 	if (rc != EOK)
@@ -113,5 +113,5 @@
  * @return EOK on success, ENOENT if not found, or another error code from
  * errno.h. */
-int bithenge_node_get(bithenge_node_t *self, bithenge_node_t *key,
+errno_t bithenge_node_get(bithenge_node_t *self, bithenge_node_t *key,
     bithenge_node_t **out)
 {
@@ -125,5 +125,5 @@
 		uint8_t byte;
 		aoff64_t size = 1;
-		int rc = bithenge_blob_read(bithenge_node_as_blob(self),
+		errno_t rc = bithenge_blob_read(bithenge_node_as_blob(self),
 		    offset, (char *)&byte, &size);
 		if (rc != EOK)
@@ -140,5 +140,5 @@
 	*out = NULL;
 	get_for_each_data_t data = {key, out};
-	int rc = bithenge_node_for_each(self, get_for_each_func, &data);
+	errno_t rc = bithenge_node_for_each(self, get_for_each_func, &data);
 	bithenge_node_dec_ref(key);
 	if (rc == EEXIST && *out)
@@ -155,5 +155,5 @@
  * @param[in] ops The operations provided.
  * @return EOK on success or an error code from errno.h. */
-int bithenge_init_internal_node(bithenge_node_t *self,
+errno_t bithenge_init_internal_node(bithenge_node_t *self,
     const bithenge_internal_node_ops_t *ops)
 {
@@ -169,5 +169,5 @@
 }
 
-static int empty_internal_node_for_each(bithenge_node_t *base,
+static errno_t empty_internal_node_for_each(bithenge_node_t *base,
     bithenge_for_each_func_t func, void *data)
 {
@@ -175,5 +175,5 @@
 }
 
-static int empty_internal_node_get(bithenge_node_t *self, bithenge_node_t *key,
+static errno_t empty_internal_node_get(bithenge_node_t *self, bithenge_node_t *key,
     bithenge_node_t **out)
 {
@@ -196,5 +196,5 @@
  * @param[out] out Holds the created node.
  * @return EOK on success or an error code from errno.h. */
-int bithenge_new_empty_internal_node(bithenge_node_t **out)
+errno_t bithenge_new_empty_internal_node(bithenge_node_t **out)
 {
 	if (bithenge_should_fail())
@@ -223,8 +223,8 @@
 }
 
-static int simple_internal_node_for_each(bithenge_node_t *base,
+static errno_t simple_internal_node_for_each(bithenge_node_t *base,
     bithenge_for_each_func_t func, void *data)
 {
-	int rc;
+	errno_t rc;
 	simple_internal_node_t *self = node_as_simple(base);
 	for (bithenge_int_t i = 0; i < self->len; i++) {
@@ -264,8 +264,8 @@
  * the nodes array rather than just dereferencing each node inside it.
  * @return EOK on success or an error code from errno.h. */
-int bithenge_new_simple_internal_node(bithenge_node_t **out,
+errno_t bithenge_new_simple_internal_node(bithenge_node_t **out,
     bithenge_node_t **nodes, bithenge_int_t len, bool needs_free)
 {
-	int rc;
+	errno_t rc;
 	assert(out);
 	simple_internal_node_t *self = malloc(sizeof(*self));
@@ -300,5 +300,5 @@
  * @param value The value for the node to hold.
  * @return EOK on success or an error code from errno.h. */
-int bithenge_new_boolean_node(bithenge_node_t **out, bool value)
+errno_t bithenge_new_boolean_node(bithenge_node_t **out, bool value)
 {
 	assert(out);
@@ -315,5 +315,5 @@
  * @param value The value for the node to hold.
  * @return EOK on success or an error code from errno.h. */
-int bithenge_new_integer_node(bithenge_node_t **out, bithenge_int_t value)
+errno_t bithenge_new_integer_node(bithenge_node_t **out, bithenge_int_t value)
 {
 	assert(out);
@@ -335,5 +335,5 @@
  * destroyed.
  * @return EOK on success or an error code from errno.h. */
-int bithenge_new_string_node(bithenge_node_t **out, const char *value, bool needs_free)
+errno_t bithenge_new_string_node(bithenge_node_t **out, const char *value, bool needs_free)
 {
 	assert(out);
@@ -359,5 +359,5 @@
  * @return EOK on success or an error code from errno.h.
  * @todo Add support for internal nodes. */
-int bithenge_node_equal(bool *out, bithenge_node_t *a, bithenge_node_t *b)
+errno_t bithenge_node_equal(bool *out, bithenge_node_t *a, bithenge_node_t *b)
 {
 	if (a->type != b->type) {
