#include <time.h>
struct sub_sect_1 {
+ struct cnode n;
byte *name;
byte *level;
int confidence[2];
static byte **str2 = DYN_ALLOC(byte *, 2, "Alice", "Bob");
static u64 u1 = 0xCafeBeefDeadC00ll;
static double d1 = -1.1;
-static struct sub_sect_1 sec1 = { "Charlie", "WBAFC", { 0, -1} };
+static struct sub_sect_1 sec1 = { {}, "Charlie", "WBAFC", { 0, -1} };
static struct clist secs;
static time_t t1, t2;
+static byte *
+init_top(void *ptr UNUSED)
+{
+ for (uns i=0; i<5; i++)
+ {
+ struct sub_sect_1 *s = cf_malloc(sizeof(struct sub_sect_1));
+ cf_init_section("slaves", &cf_sec_1, s);
+ s->confidence[1] = i;
+ clist_add_tail(&secs, &s->n);
+ }
+ return NULL;
+}
+
static byte *
commit_top(void *ptr UNUSED)
{
}
static struct cf_section cf_top UNUSED = {
+ CF_COMMIT(init_top),
CF_COMMIT(commit_top),
CF_ITEMS {
CF_INT("nr1", &nr1),