From: Quentin Young Date: Fri, 9 Mar 2018 16:20:53 +0000 (-0500) Subject: lib: frr_pthread int size nits X-Git-Tag: frr-5.0-dev~166^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b1087f35076a01882e77dda1f9c841ac1000fdec;p=matthieu%2Ffrr.git lib: frr_pthread int size nits Signed-off-by: Quentin Young --- diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index 6fafc8db36..36a89168c2 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -152,7 +152,7 @@ void frr_pthread_set_name(struct frr_pthread *fpt, const char *name) thread_master_set_name(fpt->master, name); } -struct frr_pthread *frr_pthread_get(unsigned int id) +struct frr_pthread *frr_pthread_get(uint32_t id) { static struct frr_pthread holder = {}; struct frr_pthread *fpt; @@ -234,7 +234,7 @@ uint32_t frr_pthread_get_id(void) _Atomic uint32_t nxid; nxid = atomic_fetch_add_explicit(&next_id, 1, memory_order_seq_cst); /* just a sanity check, this should never happen */ - assert(nxid <= (INT_MAX - 1)); + assert(nxid <= (UINT32_MAX - 1)); return nxid; } diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h index 3990e2a4ce..91002dd8ef 100644 --- a/lib/frr_pthread.h +++ b/lib/frr_pthread.h @@ -149,7 +149,7 @@ void frr_pthread_destroy(struct frr_pthread *fpt); * * @return frr_thread associated with the provided id, or NULL on error */ -struct frr_pthread *frr_pthread_get(unsigned int id); +struct frr_pthread *frr_pthread_get(uint32_t id); /* * Creates a new pthread and binds it to a frr_pthread.