From: Donald Sharp Date: Thu, 27 Apr 2017 02:10:33 +0000 (-0400) Subject: eigrpd: Switch u_int64_t -> uint64_t X-Git-Tag: reindent-master-before~197^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=838cf8aba548d8fae9ddfb4313dd361f1047865a;p=matthieu%2Ffrr.git eigrpd: Switch u_int64_t -> uint64_t Apparently u_int64_t is not available (or we don't pull the right headers in for solaris based systems ). Signed-off-by: Donald Sharp --- diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c index 645b70d23b..7fa135d968 100644 --- a/eigrpd/eigrp_interface.c +++ b/eigrpd/eigrp_interface.c @@ -589,7 +589,7 @@ eigrp_if_lookup_recv_if (struct eigrp *eigrp, struct in_addr src, u_int32_t eigrp_bandwidth_to_scaled (u_int32_t bandwidth) { - u_int64_t temp_bandwidth = (256ull * 10000000) / bandwidth; + uint64_t temp_bandwidth = (256ull * 10000000) / bandwidth; temp_bandwidth = temp_bandwidth < EIGRP_MAX_METRIC ? temp_bandwidth : EIGRP_MAX_METRIC; @@ -600,7 +600,7 @@ eigrp_bandwidth_to_scaled (u_int32_t bandwidth) u_int32_t eigrp_scaled_to_bandwidth (u_int32_t scaled) { - u_int64_t temp_scaled = scaled * (256ull * 10000000); + uint64_t temp_scaled = scaled * (256ull * 10000000); temp_scaled = temp_scaled < EIGRP_MAX_METRIC ? temp_scaled : EIGRP_MAX_METRIC; diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index 9898d16921..dff7f27277 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -390,7 +390,7 @@ eigrp_network_unset(struct eigrp *eigrp, struct prefix_ipv4 *p) u_int32_t eigrp_calculate_metrics(struct eigrp *eigrp, struct eigrp_metrics *metric) { - u_int64_t temp_metric; + uint64_t temp_metric; temp_metric = 0; if(metric->delay == EIGRP_MAX_METRIC) @@ -424,8 +424,8 @@ eigrp_calculate_total_metrics(struct eigrp *eigrp, struct eigrp_neighbor_entry *entry) { entry->total_metric = entry->reported_metric; - u_int64_t temp_delay = (u_int64_t) entry->total_metric.delay - + (u_int64_t) EIGRP_IF_PARAM (entry->ei, delay); + uint64_t temp_delay = (uint64_t) entry->total_metric.delay + + (uint64_t) EIGRP_IF_PARAM (entry->ei, delay); entry->total_metric.delay = temp_delay > EIGRP_MAX_METRIC ? EIGRP_MAX_METRIC : (u_int32_t) temp_delay; diff --git a/eigrpd/eigrp_structs.h b/eigrpd/eigrp_structs.h index 6e90c8cbae..b891475c2c 100644 --- a/eigrpd/eigrp_structs.h +++ b/eigrpd/eigrp_structs.h @@ -106,8 +106,8 @@ struct eigrp struct list *topology_table; - u_int64_t serno; /* Global serial number counter for topology entry changes*/ - u_int64_t serno_last_update; /* Highest serial number of information send by last update*/ + uint64_t serno; /* Global serial number counter for topology entry changes*/ + uint64_t serno_last_update; /* Highest serial number of information send by last update*/ struct list *topology_changes_internalIPV4; struct list *topology_changes_externalIPV4; @@ -492,7 +492,7 @@ struct eigrp_prefix_entry //If network type is REMOTE_EXTERNAL, pointer will have reference to its external TLV struct TLV_IPv4_External_type *extTLV; - u_int64_t serno; /*Serial number for this entry. Increased with each change of entry*/ + uint64_t serno; /*Serial number for this entry. Increased with each change of entry*/ }; /* EIGRP Topology table record structure */ diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c index c2f420090c..25beb63e80 100644 --- a/eigrpd/eigrp_topology.c +++ b/eigrpd/eigrp_topology.c @@ -464,7 +464,7 @@ eigrp_topology_update_node_flags(struct eigrp_prefix_entry *dest) for (ALL_LIST_ELEMENTS_RO(dest->entries, node, entry)) { - if ((entry->distance <= (u_int64_t)(dest->distance*eigrp->variance)) && + if ((entry->distance <= (uint64_t)(dest->distance*eigrp->variance)) && entry->distance != EIGRP_MAX_METRIC) // is successor { entry->flags |= EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG;