aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/ha/ha_attribute.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2016-03-22 13:22:01 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2016-03-24 18:52:48 +0100
commitb12c53ce77beb8e04b044d0c0dc9249ddba72200 (patch)
treefc73241398d3ee6850e4aee0d24a863d43abb010 /src/libcharon/plugins/ha/ha_attribute.c
parentb210369314cd1e0f889fd1b73dae4d45baa968a8 (diff)
downloadstrongswan-b12c53ce77beb8e04b044d0c0dc9249ddba72200.tar.bz2
strongswan-b12c53ce77beb8e04b044d0c0dc9249ddba72200.tar.xz
Use standard unsigned integer types
Diffstat (limited to 'src/libcharon/plugins/ha/ha_attribute.c')
-rw-r--r--src/libcharon/plugins/ha/ha_attribute.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcharon/plugins/ha/ha_attribute.c b/src/libcharon/plugins/ha/ha_attribute.c
index 2b271a8e7..b20ef876a 100644
--- a/src/libcharon/plugins/ha/ha_attribute.c
+++ b/src/libcharon/plugins/ha/ha_attribute.c
@@ -83,7 +83,7 @@ static host_t* offset2host(pool_t *pool, int offset)
{
chunk_t addr;
host_t *host;
- u_int32_t *pos;
+ uint32_t *pos;
if (offset > pool->size)
{
@@ -93,11 +93,11 @@ static host_t* offset2host(pool_t *pool, int offset)
addr = chunk_clone(pool->base->get_address(pool->base));
if (pool->base->get_family(pool->base) == AF_INET6)
{
- pos = (u_int32_t*)(addr.ptr + 12);
+ pos = (uint32_t*)(addr.ptr + 12);
}
else
{
- pos = (u_int32_t*)addr.ptr;
+ pos = (uint32_t*)addr.ptr;
}
*pos = htonl(offset + ntohl(*pos));
host = host_create_from_chunk(pool->base->get_family(pool->base), addr, 0);
@@ -111,7 +111,7 @@ static host_t* offset2host(pool_t *pool, int offset)
static int host2offset(pool_t *pool, host_t *addr)
{
chunk_t host, base;
- u_int32_t hosti, basei;
+ uint32_t hosti, basei;
if (addr->get_family(addr) != pool->base->get_family(pool->base))
{
@@ -129,8 +129,8 @@ static int host2offset(pool_t *pool, host_t *addr)
host = chunk_skip(host, 12);
base = chunk_skip(base, 12);
}
- hosti = ntohl(*(u_int32_t*)(host.ptr));
- basei = ntohl(*(u_int32_t*)(base.ptr));
+ hosti = ntohl(*(uint32_t*)(host.ptr));
+ basei = ntohl(*(uint32_t*)(base.ptr));
if (hosti > basei + pool->size)
{
return -1;