summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_btoa.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_btoa.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_btoa.c')
-rw-r--r--bgpd/bgp_btoa.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c
index 4faebb538..bf2607f2e 100644
--- a/bgpd/bgp_btoa.c
+++ b/bgpd/bgp_btoa.c
@@ -68,12 +68,12 @@ enum MRT_MSG_TYPES {
MSG_TABLE_DUMP /* routing table dump */
};
-static int attr_parse(struct stream *s, u_int16_t len)
+static int attr_parse(struct stream *s, uint16_t len)
{
- u_int flag;
- u_int type;
- u_int16_t length;
- u_int16_t lim;
+ unsigned int flag;
+ unsigned int type;
+ uint16_t length;
+ uint16_t lim;
lim = s->getp + len;
@@ -94,7 +94,7 @@ static int attr_parse(struct stream *s, u_int16_t len)
switch (type) {
case BGP_ATTR_ORIGIN: {
- u_char origin;
+ uint8_t origin;
origin = stream_getc(s);
printf("ORIGIN: %d\n", origin);
} break;
@@ -134,7 +134,7 @@ int main(int argc, char **argv)
int family;
struct in_addr sip;
struct in_addr dip;
- u_int16_t viewno, seq_num;
+ uint16_t viewno, seq_num;
struct prefix_ipv4 p;
s = stream_new(10000);
@@ -230,10 +230,10 @@ int main(int argc, char **argv)
/* printf ("now read %d\n", len); */
if (type == MSG_TABLE_DUMP) {
- u_char status;
+ uint8_t status;
time_t originated;
struct in_addr peer;
- u_int16_t attrlen;
+ uint16_t attrlen;
viewno = stream_getw(s);
seq_num = stream_getw(s);