From 35e60537954ebe84ca91819477622216b315d1df Mon Sep 17 00:00:00 2001 From: bg- Date: Thu, 7 Sep 2006 15:57:59 +0000 Subject: [PATCH] Use ticks for s.ticks. --- core/net/dhcpc.c | 8 ++++---- core/net/dhcpc.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/net/dhcpc.c b/core/net/dhcpc.c index bf689d8b4..6223d0085 100644 --- a/core/net/dhcpc.c +++ b/core/net/dhcpc.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: dhcpc.c,v 1.5 2006/08/27 00:07:15 oliverschmidt Exp $ + * @(#)$Id: dhcpc.c,v 1.6 2006/09/07 15:57:59 bg- Exp $ */ #include @@ -348,10 +348,10 @@ PT_THREAD(handle_dhcp(process_event_t ev, void *data)) if((ntohs(s.lease_time[0])*65536ul + ntohs(s.lease_time[1]))*CLOCK_SECOND/2 <= MAX_TICKS) { - s.ticks = (u16_t)(ntohs(s.lease_time[0])*65536ul - + ntohs(s.lease_time[1]))*CLOCK_SECOND/2; + s.ticks = (clock_time_t)((ntohs(s.lease_time[0])*65536ul + + ntohs(s.lease_time[1]))*CLOCK_SECOND/2); } else { - s.ticks = (u16_t)MAX_TICKS; + s.ticks = MAX_TICKS; } etimer_set(&s.etimer, s.ticks); diff --git a/core/net/dhcpc.h b/core/net/dhcpc.h index 0f70a2f9c..9ae01b0bd 100644 --- a/core/net/dhcpc.h +++ b/core/net/dhcpc.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: dhcpc.h,v 1.2 2006/08/09 16:13:39 bg- Exp $ + * @(#)$Id: dhcpc.h,v 1.3 2006/09/07 15:57:59 bg- Exp $ */ #ifndef __DHCPC_H__ #define __DHCPC_H__ @@ -38,7 +38,7 @@ struct dhcpc_state { char state; struct uip_udp_conn *conn; struct etimer etimer; - u16_t ticks; + clock_time_t ticks; const void *mac_addr; int mac_len;