From d7c0a89a3a5697783a6dd89333ab660074790890 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 27 Mar 2018 15:13:34 -0400 Subject: *: 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 --- watchfrr/watchfrr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'watchfrr') 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; } -- cgit v1.2.3