From 39df74a42847071837dc94237c025ce94451819b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 5 Oct 2012 16:51:44 +0200 Subject: Fix typo in 'feasible' ... --- ffd/announce.c | 12 ++++++------ ffd/ffd.c | 6 +++--- ffd/ffd.h | 4 ++-- ffd/send.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ffd/announce.c b/ffd/announce.c index 4e8e07a..5b31e91 100644 --- a/ffd/announce.c +++ b/ffd/announce.c @@ -28,15 +28,15 @@ #include "neigh.h" -bool ffd_is_feasable(const ffd_announce_t *announce, ffd_metric_seqno_t ms) { - if (FFD_IS_INFINITY(ms) || FFD_IS_INFINITY(announce->feasability_distance)) +bool ffd_is_feasible(const ffd_announce_t *announce, ffd_metric_seqno_t ms) { + if (FFD_IS_INFINITY(ms) || FFD_IS_INFINITY(announce->feasibility_distance)) return true; - int16_t seqno_diff = ms.seqno - announce->feasability_distance.seqno; + int16_t seqno_diff = ms.seqno - announce->feasibility_distance.seqno; if (seqno_diff < 0) return true; - if (seqno_diff == 0 && ms.metric < announce->feasability_distance.metric) + if (seqno_diff == 0 && ms.metric < announce->feasibility_distance.metric) return true; return false; @@ -48,7 +48,7 @@ static ffd_nexthop_t* select_nexthop(const ffd_announce_t *announce) { ffd_nexthop_t *nexthop; for (nexthop = announce->nexthop_list; nexthop; nexthop = nexthop->next) { - if (!ffd_is_feasable(announce, nexthop->metric_seqno)) + if (!ffd_is_feasible(announce, nexthop->metric_seqno)) continue; uint32_t metric = nexthop->metric_seqno.metric + ffd_neigh_get_cost(nexthop->neigh); @@ -80,7 +80,7 @@ void ffd_announce_update_nexthop(ffd_announce_t *announce) { ffd_announce_t* ffd_announce_new(void) { ffd_announce_t *a = calloc(1, sizeof(ffd_announce_t)); - a->feasability_distance.metric = 0xffff; + a->feasibility_distance.metric = 0xffff; a->next = announce_list; announce_list = a; diff --git a/ffd/ffd.c b/ffd/ffd.c index ccba14d..5817106 100644 --- a/ffd/ffd.c +++ b/ffd/ffd.c @@ -341,19 +341,19 @@ static void handle_tlv_update(const ffd_tlv_update_t *tlv_update, size_t len, ha ffd_announce_t *announce = get_announce(&arg->node_id, ntohs(tlv_update->type), ntohs(tlv_update->key)); ffd_metric_seqno_t ms = { ntohs(tlv_update->metric), ntohs(tlv_update->seqno) }; - bool feasable = ffd_is_feasable(announce, ms); + bool feasible = ffd_is_feasible(announce, ms); ffd_neigh_t *neigh = get_tlv_neigh(arg); ffd_nexthop_t *nexthop = find_nexthop(announce, neigh); if (!nexthop) { - if (!feasable || tlv_update->metric == 0xffff /* no need to ntohs */) + if (!feasible || tlv_update->metric == 0xffff /* no need to ntohs */) return; nexthop = new_nexthop(announce, neigh); } else { - if (!feasable && nexthop == announce->selected) + if (!feasible && nexthop == announce->selected) return; } diff --git a/ffd/ffd.h b/ffd/ffd.h index a93c855..946fcd3 100644 --- a/ffd/ffd.h +++ b/ffd/ffd.h @@ -96,7 +96,7 @@ typedef struct _ffd_announce_t { uint16_t type; uint16_t key; - ffd_metric_seqno_t feasability_distance; + ffd_metric_seqno_t feasibility_distance; ffd_nexthop_t *selected; ffd_nexthop_t *nexthop_list; @@ -147,7 +147,7 @@ extern int sockfd; extern struct timespec now; -bool ffd_is_feasable(const ffd_announce_t *announce, ffd_metric_seqno_t ms); +bool ffd_is_feasible(const ffd_announce_t *announce, ffd_metric_seqno_t ms); ffd_metric_seqno_t ffd_announce_get_metric(const ffd_announce_t *announce); void ffd_announce_update_nexthop(ffd_announce_t *announce); ffd_announce_t* ffd_announce_new(void); diff --git a/ffd/send.c b/ffd/send.c index 779476b..142d07a 100644 --- a/ffd/send.c +++ b/ffd/send.c @@ -182,7 +182,7 @@ static bool add_update(ffd_packet_t *packet, size_t max_len, ffd_node_id_t *node } } - announce->feasability_distance = metric; + announce->feasibility_distance = metric; return true; } -- cgit v1.2.3