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 /lib/sockopt.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 'lib/sockopt.c')
-rw-r--r-- | lib/sockopt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c index d100991a3..1d8d9990d 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -56,7 +56,7 @@ void setsockopt_so_sendbuf(const int sock, int size) int getsockopt_so_sendbuf(const int sock) { - u_int32_t optval; + uint32_t optval; socklen_t optlen = sizeof(optval); int ret = getsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&optval, &optlen); @@ -382,7 +382,7 @@ int setsockopt_ipv4_multicast_if(int sock, struct in_addr if_addr, #endif } -int setsockopt_ipv4_multicast_loop(int sock, u_char val) +int setsockopt_ipv4_multicast_loop(int sock, uint8_t val) { int ret; @@ -584,9 +584,9 @@ int sockopt_tcp_signature(int sock, union sockunion *su, const char *password) #define TCP_MD5_AUTH_ADD 1 #define TCP_MD5_AUTH_DEL 2 struct tcp_rfc2385_cmd { - u_int8_t command; /* Command - Add/Delete */ - u_int32_t address; /* IPV4 address associated */ - u_int8_t keylen; /* MD5 Key len (do NOT assume 0 terminated + uint8_t command; /* Command - Add/Delete */ + uint32_t address; /* IPV4 address associated */ + uint8_t keylen; /* MD5 Key len (do NOT assume 0 terminated ascii) */ void *key; /* MD5 Key */ } cmd; |