From: Vincent Bernat Date: Fri, 31 Aug 2012 21:06:24 +0000 (+0200) Subject: tests: fix tests compilation X-Git-Tag: 0.6.1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d79c3de4ed9af2914ee443a3a03e1dadee94071a;p=thirdparty%2Flldpd.git tests: fix tests compilation Some tests were not compilable any more due to previous changes in `struct lldpd`. --- diff --git a/src/daemon/event.c b/src/daemon/event.c index 76d3c9d7..5a7c40d5 100644 --- a/src/daemon/event.c +++ b/src/daemon/event.c @@ -236,7 +236,7 @@ levent_ctl_notify(char *ifname, int state, struct lldpd_port *neighbor) .neighbor = neighbor }; void *output = NULL; - ssize_t output_len; + ssize_t output_len = 0; /* Don't use TAILQ_FOREACH, the client may be deleted in case of errors. */ for (client = TAILQ_FIRST(&lldpd_clients); diff --git a/tests/check_edp.c b/tests/check_edp.c index 9dd7c7d2..e30c2732 100644 --- a/tests/check_edp.c +++ b/tests/check_edp.c @@ -499,7 +499,7 @@ Extreme Discovery Protocol struct lldpd cfg; char mac1[] = { 0x00, 0x04, 0x96, 0x05, 0x44, 0x6f }; - cfg.g_mgmt_pattern = NULL; + cfg.g_config.c_mgmt_pattern = NULL; fail_unless(edp_decode(&cfg, pkt1, sizeof(pkt1), &hardware, &nchassis, &nport) != -1); if (!nchassis || !nport) { diff --git a/tests/check_snmp.c b/tests/check_snmp.c index db145a46..dbe0c668 100644 --- a/tests/check_snmp.c +++ b/tests/check_snmp.c @@ -15,8 +15,10 @@ extern int asprintf (char **, char *, ...); /* Our test config */ struct lldpd test_cfg = { - .g_delay = 30, - .g_smart = 0, + .g_config = { + .c_delay = 30, + .c_smart = 0 + } }; struct timeval test_starttime = { .tv_sec = 100, .tv_usec = 0 };