From 7853a7434bea7a12800e4e983e05f8bfc0146559 Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Sun, 12 Jun 2016 11:32:12 +0200 Subject: [PATCH] fix for compilation with clang - issue reported by Olaf Bergmann --- core/net/rpl/rpl-timers.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/net/rpl/rpl-timers.c b/core/net/rpl/rpl-timers.c index 1a159e5bb..8149401b4 100644 --- a/core/net/rpl/rpl-timers.c +++ b/core/net/rpl/rpl-timers.c @@ -84,11 +84,13 @@ handle_periodic_timer(void *ptr) rpl_dag_t *dag = rpl_get_any_dag(); rpl_purge_dags(); - if(dag != NULL && RPL_IS_STORING(dag->instance)) { - rpl_purge_routes(); - } - if(dag != NULL && RPL_IS_NON_STORING(dag->instance)) { - rpl_ns_periodic(); + if(dag != NULL) { + if(RPL_IS_STORING(dag->instance)) { + rpl_purge_routes(); + } + if(RPL_IS_NON_STORING(dag->instance)) { + rpl_ns_periodic(); + } } rpl_recalculate_ranks();