summaryrefslogtreecommitdiffstats
path: root/hal
diff options
context:
space:
mode:
Diffstat (limited to 'hal')
-rw-r--r--hal/untyped.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hal/untyped.c b/hal/untyped.c
index 6957175..ca69228 100644
--- a/hal/untyped.c
+++ b/hal/untyped.c
@@ -18,7 +18,7 @@ int
untyped_split(jove_owned_obj_t *tgt, jove_owned_obj_t *dst, size_t bytes)
{
jove_untyped_t *tgt_untyped = obj_deref(tgt);
- if(tgt_untyped->limit - bytes < JOVE_UNTYPED_MINSIZE) return ETOOSMALL;
+ if(tgt_untyped->limit - bytes < JOVE_UNTYPED_MINSIZE) return -ETOOSMALL;
tgt_untyped->limit -= bytes;
obj_settype(dst, JOVE_OBJ_UNTYPED);
@@ -35,7 +35,7 @@ untyped_merge(jove_owned_obj_t *a, jove_owned_obj_t *b)
jove_untyped_t *a_untyped = obj_deref(a);
jove_untyped_t *b_untyped = obj_deref(b);
if((uintptr_t)a_untyped + a_untyped->limit == (uintptr_t)b_untyped) {
- return EBADARG;
+ return -EBADARG;
}
if((uintptr_t)b_untyped + b_untyped->limit == (uintptr_t)a_untyped) {
return untyped_merge(b, a);