#include <float.h>
#include <time.h>
#include <sys/time.h>
+#include "lib6lowpan/lib6lowpan.h"
+
#include "nwstate.h"
#include "hashtable.h"
#include "logging.h"
-#include "lib6lowpan.h"
#include "routing.h"
-#include "vty.h"
+#include "vty/vty.h"
struct hashtable *links;
struct hashtable *routers;
l = nw_add_incr_edge(v1, &te);
l->marked = L_STICKY;
} else {
- VTY_printf("add a link: 'a <n1> <n2>'\r\n");
+ VTY_printf("add a link: '%s <n1> <n2>'\r\n", argv[0]);
}
VTY_flush();
}
if (ret == NULL) {
key = (router_key_t *)malloc(sizeof(router_key_t));
ret = (router_t *)malloc(sizeof(router_t));
+ memset(ret, 0, sizeof(router_t));
ret->id = rid;
ret->links = NULL;
router_t *r1 = get_insert_router(v1);
router_t *r2 = get_insert_router(v2);
link_str = (link_t *)malloc(sizeof(link_t));
+ memset(link_str, 0, sizeof(link_t));
new_key->r1 = v1;
new_key->r2 = v2;