]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: frr_pthread int size nits 1831/head
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 9 Mar 2018 16:20:53 +0000 (11:20 -0500)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 9 Mar 2018 16:20:53 +0000 (11:20 -0500)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/frr_pthread.c
lib/frr_pthread.h

index 6fafc8db3638340482e2f3901fd6f67d2d042b08..36a89168c28fc9ec8bba552dce8e2bdb96b3f0d5 100644 (file)
@@ -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;
 }
 
index 3990e2a4ceb4a728b156f05a00a3aa6f267729f2..91002dd8eff6fb052c92c5d584f1e38351cb985d 100644 (file)
@@ -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.