summaryrefslogtreecommitdiff
path: root/zebra/rtadv.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rtadv.c')
-rw-r--r--zebra/rtadv.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 12e4873adf..7f46066a63 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -15,10 +15,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -1574,11 +1573,8 @@ rtadv_event (struct zebra_ns *zns, enum rtadv_event event, int val)
switch (event)
{
case RTADV_START:
- if (! rtadv->ra_read)
- rtadv->ra_read = thread_add_read (zebrad.master, rtadv_read, zns, val);
- if (! rtadv->ra_timer)
- rtadv->ra_timer = thread_add_event (zebrad.master, rtadv_timer,
- zns, 0);
+ thread_add_read(zebrad.master, rtadv_read, zns, val, &rtadv->ra_read);
+ thread_add_event(zebrad.master, rtadv_timer, zns, 0, &rtadv->ra_timer);
break;
case RTADV_STOP:
if (rtadv->ra_timer)
@@ -1593,18 +1589,14 @@ rtadv_event (struct zebra_ns *zns, enum rtadv_event event, int val)
}
break;
case RTADV_TIMER:
- if (! rtadv->ra_timer)
- rtadv->ra_timer = thread_add_timer (zebrad.master, rtadv_timer, zns,
- val);
+ thread_add_timer(zebrad.master, rtadv_timer, zns, val, &rtadv->ra_timer);
break;
case RTADV_TIMER_MSEC:
- if (! rtadv->ra_timer)
- rtadv->ra_timer = thread_add_timer_msec (zebrad.master, rtadv_timer,
- zns, val);
+ thread_add_timer_msec(zebrad.master, rtadv_timer, zns, val,
+ &rtadv->ra_timer);
break;
case RTADV_READ:
- if (! rtadv->ra_read)
- rtadv->ra_read = thread_add_read (zebrad.master, rtadv_read, zns, val);
+ thread_add_read(zebrad.master, rtadv_read, zns, val, &rtadv->ra_read);
break;
default:
break;