aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/pool.h3
-rw-r--r--src/vppinfra/time.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/vppinfra/pool.h b/src/vppinfra/pool.h
index 8b39a914eb5..0f64262abf1 100644
--- a/src/vppinfra/pool.h
+++ b/src/vppinfra/pool.h
@@ -475,6 +475,9 @@ do { \
(_pool_var (rv) < vec_len (P) ? \
clib_bitmap_next_clear (_pool_var (p)->free_bitmap, _pool_var(rv)) \
: ~0); \
+ _pool_var(rv) = \
+ (_pool_var (rv) < vec_len (P) ? \
+ _pool_var (rv) : ~0); \
_pool_var(rv); \
})
diff --git a/src/vppinfra/time.h b/src/vppinfra/time.h
index ead4b7d8ea4..39bc188ebe5 100644
--- a/src/vppinfra/time.h
+++ b/src/vppinfra/time.h
@@ -196,6 +196,9 @@ clib_time_now_internal (clib_time_t * c, u64 n)
return t * c->seconds_per_clock;
}
+/* Maximum f64 value as max clib_time */
+#define CLIB_TIME_MAX (1.7976931348623157e+308)
+
always_inline f64
clib_time_now (clib_time_t * c)
{