Skip to content

Commit

Permalink
[ci skip] fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundogan committed Jan 30, 2016
1 parent 9db9025 commit 4fb3ff8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sys/include/net/gnrc/ipv6/nc.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ extern "C" {
#define GNRC_IPV6_NC_IS_ROUTER (0x08) /**< The neighbor is a router */

#define GNRC_IPV6_NC_TYPE_MASK (0x30) /**< Mask for neighbor cache state */
#define GNRC_IPV6_NC_TYPE_POS (4) /**< Shift of neighbor cache state */

/**
* @{
Expand Down Expand Up @@ -266,8 +265,14 @@ static inline uint8_t gnrc_ipv6_nc_get_type(const gnrc_ipv6_nc_t *entry)
*/
static inline bool gnrc_ipv6_nc_is_reachable(const gnrc_ipv6_nc_t *entry)
{
/* returns false if the state is unmanaged, unreachable, or incomplete */
return (gnrc_ipv6_nc_get_state(entry) > GNRC_IPV6_NC_STATE_INCOMPLETE);
switch (gnrc_ipv6_nc_get_state(entry)) {
case GNRC_IPV6_NC_STATE_UNREACHABLE:
case GNRC_IPV6_NC_STATE_INCOMPLETE:
return false;

default:
return true;
}
}

/**
Expand Down

0 comments on commit 4fb3ff8

Please sign in to comment.