summaryrefslogtreecommitdiffstats
path: root/sys/objdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/objdir.c')
-rw-r--r--sys/objdir.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/objdir.c b/sys/objdir.c
index f956309..5b59ddc 100644
--- a/sys/objdir.c
+++ b/sys/objdir.c
@@ -4,16 +4,15 @@
#include "hal/obj.h"
#include "lib/string.h"
#include "jove.h"
-#include <errno.h>
int
objdir_new(jove_owned_obj_t *untyped_obj)
{
jove_untyped_t *untyped = obj_deref(untyped_obj);
- if((uintptr_t)untyped & (JOVE_OBJDIR_SIZE - 1)) return -EALIGN;
- if(untyped->limit != JOVE_OBJDIR_SIZE) return -EBADSIZE;
+ if((uintptr_t)untyped & (OBJDIR_SIZE - 1)) return -EALIGN;
+ if(untyped->limit != OBJDIR_SIZE) return -EBADSIZE;
- memset(untyped, 0, JOVE_OBJDIR_SIZE);
+ memset(untyped, 0, OBJDIR_SIZE);
obj_settype(untyped_obj, JOVE_OBJ_OBJDIR);
return 0;
}
@@ -27,7 +26,7 @@ objdir_peeklocal(
errno = EBADOBJ;
return (jove_obj_t) { 0 };
}
- if(entry >= JOVE_OBJDIR_ENTRIES) {
+ if(entry >= OBJDIR_ENTRIES) {
errno = EBADPATH;
return (jove_obj_t) { 0 };
}
@@ -44,7 +43,7 @@ objdir_getlocal(
if(obj_gettype(objdir_obj) != JOVE_OBJ_OBJDIR) {
reterr(EBADOBJ);
}
- if(entry >= JOVE_OBJDIR_ENTRIES) {
+ if(entry >= OBJDIR_ENTRIES) {
reterr(EBADPATH);
}
@@ -60,7 +59,7 @@ objdir_trygetlocal(
if(obj_gettype(objdir_obj) != JOVE_OBJ_OBJDIR) {
reterr(EBADOBJ);
}
- if(entry >= JOVE_OBJDIR_ENTRIES) {
+ if(entry >= OBJDIR_ENTRIES) {
reterr(EBADPATH);
}