summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_network.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 21:13:34 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 21:13:34 +0200
commitd7c0a89a3a5697783a6dd89333ab660074790890 (patch)
treeeefa73e502f919b524b8a345437260d4acc23083 /eigrpd/eigrp_network.c
parenttools, doc: update checkpatch for u_int_* (diff)
downloadfrr-d7c0a89a3a5697783a6dd89333ab660074790890.tar.xz
frr-d7c0a89a3a5697783a6dd89333ab660074790890.zip
*: use C99 standard fixed-width integer types
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_network.c')
-rw-r--r--eigrpd/eigrp_network.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c
index a70a7fc76..2578fecb3 100644
--- a/eigrpd/eigrp_network.c
+++ b/eigrpd/eigrp_network.c
@@ -150,7 +150,7 @@ void eigrp_adjust_sndbuflen(struct eigrp *eigrp, unsigned int buflen)
int eigrp_if_ipmulticast(struct eigrp *top, struct prefix *p,
unsigned int ifindex)
{
- u_char val;
+ uint8_t val;
int ret, len;
val = 0;
@@ -368,8 +368,8 @@ int eigrp_network_unset(struct eigrp *eigrp, struct prefix *p)
return 1;
}
-u_int32_t eigrp_calculate_metrics(struct eigrp *eigrp,
- struct eigrp_metrics metric)
+uint32_t eigrp_calculate_metrics(struct eigrp *eigrp,
+ struct eigrp_metrics metric)
{
uint64_t temp_metric;
temp_metric = 0;
@@ -396,13 +396,13 @@ u_int32_t eigrp_calculate_metrics(struct eigrp *eigrp,
+ eigrp->k_values[3]);
if (temp_metric <= EIGRP_MAX_METRIC)
- return (u_int32_t)temp_metric;
+ return (uint32_t)temp_metric;
else
return EIGRP_MAX_METRIC;
}
-u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
- struct eigrp_nexthop_entry *entry)
+uint32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
+ struct eigrp_nexthop_entry *entry)
{
struct eigrp_interface *ei = entry->ei;
@@ -412,9 +412,9 @@ u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
+ (uint64_t)eigrp_delay_to_scaled(ei->params.delay);
entry->total_metric.delay = temp_delay > EIGRP_MAX_METRIC
? EIGRP_MAX_METRIC
- : (u_int32_t)temp_delay;
+ : (uint32_t)temp_delay;
- u_int32_t bw = eigrp_bandwidth_to_scaled(ei->params.bandwidth);
+ uint32_t bw = eigrp_bandwidth_to_scaled(ei->params.bandwidth);
entry->total_metric.bandwidth = entry->total_metric.bandwidth > bw
? bw
: entry->total_metric.bandwidth;
@@ -422,8 +422,8 @@ u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
return eigrp_calculate_metrics(eigrp, entry->total_metric);
}
-u_char eigrp_metrics_is_same(struct eigrp_metrics metric1,
- struct eigrp_metrics metric2)
+uint8_t eigrp_metrics_is_same(struct eigrp_metrics metric1,
+ struct eigrp_metrics metric2)
{
if ((metric1.bandwidth == metric2.bandwidth)
&& (metric1.delay == metric2.delay)