update controller code

This commit is contained in:
Rongsong Shen 2025-11-05 16:58:57 +08:00
parent 2836d196da
commit 41f56fa6ed
54 changed files with 9688 additions and 214 deletions

View file

@ -309,14 +309,15 @@ int objmgr_set_default(objmgr_t* mgr)
return 0;
}
myobj_t *obj_alloc(size_t size) {
myobj_t *obj;
myobj_t* obj_alloc(size_t size)
{
myobj_t* obj;
if (size <= 0) {
SET_ERROR(EINVAL);
return NULL;
SET_ERROR(EINVAL);
return NULL;
}
obj = (myobj_t *)calloc(1, sizeof(*obj) + size);
obj = (myobj_t*)calloc(1, sizeof(*obj) + size);
return obj;
}