X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fvec_bootstrap.h;h=5c42e5ea9144c2d8d9563632cc0b3fa9e95a32ad;hb=70d5d4fa09520bd5825b49960ae896beca3535e8;hp=7fb016fe8d2426ec3af0b7196eccf6abb02b69e9;hpb=3ad078d75d1430b3f71c28a0e8dc7a880b28d332;p=vpp.git diff --git a/src/vppinfra/vec_bootstrap.h b/src/vppinfra/vec_bootstrap.h index 7fb016fe8d2..5c42e5ea914 100644 --- a/src/vppinfra/vec_bootstrap.h +++ b/src/vppinfra/vec_bootstrap.h @@ -160,16 +160,21 @@ vec_aligned_header_end (void *v, uword header_bytes, uword align) #define vec_max_len(v) (vec_capacity(v,0) / sizeof (v[0])) /** \brief Set vector length to a user-defined value */ +#ifndef __COVERITY__ /* Coverity gets confused by ASSERT() */ #define vec_set_len(v, l) do { \ ASSERT(v); \ ASSERT((l) <= vec_max_len(v)); \ _vec_len(v) = (l); \ } while (0) +#else /* __COVERITY__ */ +#define vec_set_len(v, l) do { \ + _vec_len(v) = (l); \ +} while (0) +#endif /* __COVERITY__ */ /** \brief Reset vector length to zero NULL-pointer tolerant */ - #define vec_reset_length(v) do { if (v) vec_set_len (v, 0); } while (0) /** \brief End (last data address) of vector. */