diff --git a/sys/include/net/gnrc/rpl/dodag.h b/sys/include/net/gnrc/rpl/dodag.h index 69a209fbd7..06d97426a0 100644 --- a/sys/include/net/gnrc/rpl/dodag.h +++ b/sys/include/net/gnrc/rpl/dodag.h @@ -80,11 +80,8 @@ bool gnrc_rpl_instance_remove_by_id(uint8_t instance_id); * @brief Remove a RPL instance with the pointer @p inst. * * @param[in] inst Pointer to the RPL instance to remove. - * - * @return true, on success. - * @return false, otherwise. */ -bool gnrc_rpl_instance_remove(gnrc_rpl_instance_t *inst); +void gnrc_rpl_instance_remove(gnrc_rpl_instance_t *inst); /** * @brief Get the RPL instance with the id @p instance_id. diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c index 8734b72184..56655157af 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c @@ -115,13 +115,14 @@ bool gnrc_rpl_instance_remove_by_id(uint8_t instance_id) { for(uint8_t i = 0; i < GNRC_RPL_INSTANCES_NUMOF; ++i) { if (gnrc_rpl_instances[i].id == instance_id) { - return gnrc_rpl_instance_remove(&gnrc_rpl_instances[i]); + gnrc_rpl_instance_remove(&gnrc_rpl_instances[i]); + return true; } } return false; } -bool gnrc_rpl_instance_remove(gnrc_rpl_instance_t *inst) +void gnrc_rpl_instance_remove(gnrc_rpl_instance_t *inst) { gnrc_rpl_dodag_t *dodag = &inst->dodag; #ifdef MODULE_GNRC_RPL_P2P @@ -132,7 +133,6 @@ bool gnrc_rpl_instance_remove(gnrc_rpl_instance_t *inst) evtimer_del(&gnrc_rpl_evtimer, (evtimer_event_t *)&dodag->dao_event); evtimer_del(&gnrc_rpl_evtimer, (evtimer_event_t *)&inst->cleanup_event); memset(inst, 0, sizeof(gnrc_rpl_instance_t)); - return true; } gnrc_rpl_instance_t *gnrc_rpl_instance_get(uint8_t instance_id) diff --git a/sys/shell/cmds/gnrc_rpl.c b/sys/shell/cmds/gnrc_rpl.c index a4707f68bb..e3fa12d802 100644 --- a/sys/shell/cmds/gnrc_rpl.c +++ b/sys/shell/cmds/gnrc_rpl.c @@ -106,10 +106,7 @@ int _gnrc_rpl_instance_remove(char *arg1) return 1; } - if (gnrc_rpl_instance_remove(inst) == false) { - printf("error: could not remove instance (%d)\n", instance_id); - return 1; - } + gnrc_rpl_instance_remove(inst); printf("success: removed instance (%d)\n", instance_id); return 0;