diff options
author | 2016-07-27 10:00:58 -0400 | |
---|---|---|
committer | 2016-07-27 11:15:44 -0400 | |
commit | b2a6e25067a41def7d5795df6d07231b55051ab2 (patch) | |
tree | b48ea3d18dd04c71f757daceeae3f03f67f12a47 /vlib/vlib/threads.c | |
parent | 5afccb2578d767e3a2be4316211ff38006c336a6 (diff) |
VPP-189 coverity warning cleanups
Change-Id: Ia4fbf4352119504e022b89d10d44a5259d94f316
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib/vlib/threads.c')
-rw-r--r-- | vlib/vlib/threads.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vlib/vlib/threads.c b/vlib/vlib/threads.c index 47db218d..72f340ea 100644 --- a/vlib/vlib/threads.c +++ b/vlib/vlib/threads.c @@ -81,10 +81,15 @@ void vlib_set_thread_name (char *name) { int pthread_setname_np (pthread_t __target_thread, const char *__name); + int rv; pthread_t thread = pthread_self (); if (thread) - pthread_setname_np (thread, name); + { + rv = pthread_setname_np (thread, name); + if (rv) + clib_warning ("pthread_setname_np returned %d", rv); + } } static int @@ -114,7 +119,8 @@ vlib_sysfs_list_to_bitmap (char *filename) unformat_input_t in; unformat_init_string (&in, (char *) buffer, strlen ((char *) buffer)); - unformat (&in, "%U", unformat_bitmap_list, &r); + if (unformat (&in, "%U", unformat_bitmap_list, &r) != 1) + clib_warning ("unformat_bitmap_list failed"); unformat_free (&in); } vec_free (buffer); |