MCPcopy Create free account
hub / github.com/acl-dev/acl / __create_ring

Function __create_ring

unit_test/stdlib/test_ring.c:22–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20static ACL_RING __ring_header;
21
22static void __create_ring(int flag, int size)
23{
24 MY_TYPE *my_type;
25 int i;
26
27 for (i = 0; i < size; i++) {
28 my_type = acl_mycalloc(1, sizeof(MY_TYPE));
29 snprintf(my_type->name, sizeof(my_type->name), "name:%d", i);
30 snprintf(my_type->value, sizeof(my_type->value), "value:%d", i);
31 my_type->i = i;
32 if (flag)
33 acl_ring_prepend(&__ring_header, &my_type->ring_entry);
34 else
35 acl_ring_append(&__ring_header, &my_type->ring_entry);
36 }
37}
38
39int test_ring(AUT_LINE *test_line acl_unused, void *arg acl_unused)
40{

Callers 1

test_ringFunction · 0.85

Calls 2

acl_ring_prependFunction · 0.85
acl_ring_appendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…