diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 21:13:34 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 21:13:34 +0200 |
commit | d7c0a89a3a5697783a6dd89333ab660074790890 (patch) | |
tree | eefa73e502f919b524b8a345437260d4acc23083 /zebra/zebra_fpm_netlink.c | |
parent | tools, doc: update checkpatch for u_int_* (diff) | |
download | frr-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 'zebra/zebra_fpm_netlink.c')
-rw-r--r-- | zebra/zebra_fpm_netlink.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index 97a0e142f..c27884ec4 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -45,7 +45,7 @@ * * Returns string representation of an address of the given AF. */ -static inline const char *addr_to_a(u_char af, void *addr) +static inline const char *addr_to_a(uint8_t af, void *addr) { if (!addr) return "<No address>"; @@ -83,7 +83,7 @@ static const char *prefix_addr_to_a(struct prefix *prefix) * * The size of an address in a given address family. */ -static size_t af_addr_size(u_char af) +static size_t af_addr_size(uint8_t af) { switch (af) { @@ -125,10 +125,10 @@ typedef struct netlink_nh_info_t_ { */ typedef struct netlink_route_info_t_ { uint16_t nlmsg_type; - u_char rtm_type; + uint8_t rtm_type; uint32_t rtm_table; - u_char rtm_protocol; - u_char af; + uint8_t rtm_protocol; + uint8_t af; struct prefix *prefix; uint32_t *metric; unsigned int num_nhs; @@ -199,7 +199,7 @@ static int netlink_route_info_add_nh(netlink_route_info_t *ri, /* * netlink_proto_from_route_type */ -static u_char netlink_proto_from_route_type(int type) +static uint8_t netlink_proto_from_route_type(int type) { switch (type) { case ZEBRA_ROUTE_KERNEL: |