diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 15:13:34 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 15:13:34 -0400 |
| commit | d7c0a89a3a5697783a6dd89333ab660074790890 (patch) | |
| tree | eefa73e502f919b524b8a345437260d4acc23083 /watchfrr | |
| parent | 28ac5a038101c66e4275a9b1ef6fb37b4f74fb6a (diff) | |
*: 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 'watchfrr')
| -rw-r--r-- | watchfrr/watchfrr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 264882e21f..ca388d807b 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -138,7 +138,7 @@ struct daemon { daemon_state_t state; int fd; struct timeval echo_sent; - u_int connect_tries; + unsigned int connect_tries; struct thread *t_wakeup; struct thread *t_read; struct thread *t_write; @@ -552,7 +552,7 @@ static int handle_read(struct thread *t_read) snprintf(why, sizeof(why), "read returned bad echo response of %d bytes " "(expecting %u): %.*s", - (int)rc, (u_int)sizeof(resp), (int)rc, buf); + (int)rc, (unsigned int)sizeof(resp), (int)rc, buf); daemon_down(dmn, why); return 0; } @@ -888,7 +888,7 @@ static int wakeup_send_echo(struct thread *t_wakeup) char why[100 + sizeof(echocmd)]; snprintf(why, sizeof(why), "write '%s' returned %d instead of %u", echocmd, - (int)rc, (u_int)sizeof(echocmd)); + (int)rc, (unsigned int)sizeof(echocmd)); daemon_down(dmn, why); } else { gettimeofday(&dmn->echo_sent, NULL); @@ -1174,7 +1174,7 @@ int main(int argc, char **argv) if (!(dmn = (struct daemon *)calloc(1, sizeof(*dmn)))) { fprintf(stderr, "calloc(1,%u) failed: %s\n", - (u_int)sizeof(*dmn), + (unsigned int)sizeof(*dmn), safe_strerror(errno)); return 1; } |
