summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2017-12-06 17:00:05 +0100
committerOle Troan <ot@cisco.com>2017-12-06 17:49:48 +0100
commit3288ed7234ad9b6d59d249f48dd1a2d06168bfd5 (patch)
tree96d5200d8c7a0630ce127ff7387c2292342acc26 /src/vppinfra
parentbf4be5730557c4280f2f9f8b7ef1a194716c82bd (diff)
UT: Repaired broken C unit tests (--enable-tests)
Change-Id: I63d720378b92813993525f80fee90fc79df27fba Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/test_heap.c2
-rw-r--r--src/vppinfra/test_mheap.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/test_heap.c b/src/vppinfra/test_heap.c
index 3d5171bf053..95e64b728be 100644
--- a/src/vppinfra/test_heap.c
+++ b/src/vppinfra/test_heap.c
@@ -86,7 +86,7 @@ main (int argc, char *argv[])
fformat (stderr, "%U\n", format_clib_mem_usage, /* verbose */ 0);
vec_resize (objects, 1000);
- if (vec_bytes (objects)) /* stupid warning be gone */
+ if (vec_bytes (objects) > 0) /* stupid warning be gone */
memset (objects, ~0, vec_bytes (objects));
vec_resize (handles, vec_len (objects));
diff --git a/src/vppinfra/test_mheap.c b/src/vppinfra/test_mheap.c
index 6bc36b89ac3..b48e5273651 100644
--- a/src/vppinfra/test_mheap.c
+++ b/src/vppinfra/test_mheap.c
@@ -110,7 +110,7 @@ test_mheap_main (unformat_input_t * input)
max_object_size, seed);
vec_resize (objects, n_objects);
- if (vec_bytes (objects)) /* stupid warning be gone */
+ if (vec_bytes (objects) > 0) /* stupid warning be gone */
memset (objects, ~0, vec_bytes (objects));
objects_used = 0;