MCPcopy Index your code
hub / github.com/F-Stack/f-stack / stklist_push

Function stklist_push

lib/ff_memory.c:140–151  ·  view source on GitHub ↗

id: the id of element to be freed. return code: -1: faile; >=0:OK.

Source from the content-addressed store, hash-verified

138//id: the id of element to be freed.
139//return code: -1: faile; >=0:OK.
140static inline int stklist_push(StackList_t *p, const uint64_t val){
141 int tail = 0;
142
143 if (p==NULL)
144 return -1;
145 if (p->top < p->size){
146 p->ele[p->top++] = val;
147 return 0;
148 }
149 else
150 return -1;
151}
152
153static inline int stklist_size(StackList_t * p)
154{

Callers 2

ff_mmap_initFunction · 0.85
ff_mem_free_addrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected