aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/leases.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-01-30 23:45:53 +0000
committerEric Andersen <andersen@codepoet.org>2004-01-30 23:45:53 +0000
commitad95373efcd7eaa4d641a7a821e5b05fb2d31e1d (patch)
tree59f5094313c8ee69e48f632a217835a8bb36bda6 /networking/udhcp/leases.c
parent1a834be1ce792252d55b090ee806a466fe9ac4fa (diff)
downloadbusybox-ad95373efcd7eaa4d641a7a821e5b05fb2d31e1d.tar.gz
Use standard C99 types
Diffstat (limited to 'networking/udhcp/leases.c')
-rw-r--r--networking/udhcp/leases.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/networking/udhcp/leases.c b/networking/udhcp/leases.c
index add114f6c..dce056654 100644
--- a/networking/udhcp/leases.c
+++ b/networking/udhcp/leases.c
@@ -17,10 +17,10 @@
#include "common.h"
-unsigned char blank_chaddr[] = {[0 ... 15] = 0};
+uint8_t blank_chaddr[] = {[0 ... 15] = 0};
/* clear every lease out that chaddr OR yiaddr matches and is nonzero */
-void clear_lease(u_int8_t *chaddr, u_int32_t yiaddr)
+void clear_lease(uint8_t *chaddr, uint32_t yiaddr)
{
unsigned int i, j;
@@ -35,7 +35,7 @@ void clear_lease(u_int8_t *chaddr, u_int32_t yiaddr)
/* add a lease into the table, clearing out any old ones */
-struct dhcpOfferedAddr *add_lease(u_int8_t *chaddr, u_int32_t yiaddr, unsigned long lease)
+struct dhcpOfferedAddr *add_lease(uint8_t *chaddr, uint32_t yiaddr, unsigned long lease)
{
struct dhcpOfferedAddr *oldest;
@@ -80,7 +80,7 @@ struct dhcpOfferedAddr *oldest_expired_lease(void)
/* Find the first lease that matches chaddr, NULL if no match */
-struct dhcpOfferedAddr *find_lease_by_chaddr(u_int8_t *chaddr)
+struct dhcpOfferedAddr *find_lease_by_chaddr(uint8_t *chaddr)
{
unsigned int i;
@@ -92,7 +92,7 @@ struct dhcpOfferedAddr *find_lease_by_chaddr(u_int8_t *chaddr)
/* Find the first lease that matches yiaddr, NULL is no match */
-struct dhcpOfferedAddr *find_lease_by_yiaddr(u_int32_t yiaddr)
+struct dhcpOfferedAddr *find_lease_by_yiaddr(uint32_t yiaddr)
{
unsigned int i;
@@ -104,7 +104,7 @@ struct dhcpOfferedAddr *find_lease_by_yiaddr(u_int32_t yiaddr)
/* check is an IP is taken, if it is, add it to the lease table */
-static int check_ip(u_int32_t addr)
+static int check_ip(uint32_t addr)
{
struct in_addr temp;
@@ -120,9 +120,9 @@ static int check_ip(u_int32_t addr)
/* find an assignable address, it check_expired is true, we check all the expired leases as well.
* Maybe this should try expired leases by age... */
-u_int32_t find_address(int check_expired)
+uint32_t find_address(int check_expired)
{
- u_int32_t addr, ret;
+ uint32_t addr, ret;
struct dhcpOfferedAddr *lease = NULL;
addr = ntohl(server_config.start); /* addr is in host order here */