summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_aspath.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 /bgpd/bgp_aspath.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 'bgpd/bgp_aspath.c')
-rw-r--r--bgpd/bgp_aspath.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index c3bbb7168..e02617691 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -80,8 +80,8 @@
* NOT the internal representation!
*/
struct assegment_header {
- u_char type;
- u_char length;
+ uint8_t type;
+ uint8_t length;
};
/* Hash for aspath. This is the top level structure of AS path. */
@@ -109,7 +109,7 @@ const char *aspath_segment_type_str[] = {"as-invalid", "as-set", "as-sequence",
* the caller should immediately assign data to the segment, as the segment
* otherwise is not generally valid
*/
-static struct assegment *assegment_new(u_char type, u_short length)
+static struct assegment *assegment_new(uint8_t type, unsigned short length)
{
struct assegment *new;
@@ -345,7 +345,7 @@ void aspath_unintern(struct aspath **aspath)
/* Return the start or end delimiters for a particular Segment type */
#define AS_SEG_START 0
#define AS_SEG_END 1
-static char aspath_delimiter_char(u_char type, u_char which)
+static char aspath_delimiter_char(uint8_t type, uint8_t which)
{
int i;
struct {
@@ -864,7 +864,7 @@ static void assegment_data_put(struct stream *s, as_t *as, int num,
}
}
-static size_t assegment_header_put(struct stream *s, u_char type, int length)
+static size_t assegment_header_put(struct stream *s, uint8_t type, int length)
{
size_t lenp;
assert(length <= AS_SEGMENT_MAX);
@@ -962,7 +962,7 @@ size_t aspath_put(struct stream *s, struct aspath *as, int use32bit)
* We have no way to manage the storage, so we use a static stream
* wrapper around aspath_put.
*/
-u_char *aspath_snmp_pathseg(struct aspath *as, size_t *varlen)
+uint8_t *aspath_snmp_pathseg(struct aspath *as, size_t *varlen)
{
#define SNMP_PATHSEG_MAX 1024
@@ -1541,7 +1541,7 @@ struct aspath *aspath_filter_exclude(struct aspath *source,
/* Add specified AS to the leftmost of aspath. */
static struct aspath *aspath_add_asns(struct aspath *aspath, as_t asno,
- u_char type, unsigned num)
+ uint8_t type, unsigned num)
{
struct assegment *assegment = aspath->segments;
unsigned i;
@@ -1872,7 +1872,7 @@ enum as_token {
/* Return next token and point for string parse. */
static const char *aspath_gettoken(const char *buf, enum as_token *token,
- u_long *asno)
+ unsigned long *asno)
{
const char *p = buf;
@@ -1937,8 +1937,8 @@ static const char *aspath_gettoken(const char *buf, enum as_token *token,
struct aspath *aspath_str2aspath(const char *str)
{
enum as_token token = as_token_unknown;
- u_short as_type;
- u_long asno = 0;
+ unsigned short as_type;
+ unsigned long asno = 0;
struct aspath *aspath;
int needtype;