From 531d5a904a3a91bca8b7d373fb6ab2869b31e7fa Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 17 May 2007 22:17:24 +0000 Subject: [PATCH] Properly use the timeout_initialized() macro. --- src/graph.c | 2 +- src/net_packet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graph.c b/src/graph.c index 02650f73..95894772 100644 --- a/src/graph.c +++ b/src/graph.c @@ -376,7 +376,7 @@ void graph(void) sssp_bfs(); mst_kruskal(); - if(!ev.ev_callback) + if(!timeout_initialized(&ev)) timeout_set(&ev, dump_graph, NULL); event_add(&ev, &(struct timeval){5, 0}); } diff --git a/src/net_packet.c b/src/net_packet.c index 57794f98..84b2707d 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -98,7 +98,7 @@ static void send_mtu_probe_handler(int fd, short events, void *data) { } void send_mtu_probe(node_t *n) { - if(!n->mtuevent.ev_callback) + if(!timeout_initialized(&n->mtuevent)) timeout_set(&n->mtuevent, send_mtu_probe_handler, n); send_mtu_probe_handler(0, 0, n); } -- 2.20.1