Fix bug (number of reader was too big, resulting in potential segfault)

This commit is contained in:
Patrick Pelissier committed 2019-07-16 23:00:10 +02:00
1 parent 2c921fdefe
commit b8f44cc219
1 file changed
+1 -1
+1 -1
View File
@@ -351,7 +351,7 @@ static inline unsigned int snapshot_mrsw_int_get_write_idx(snapshot_mrsw_int_t s
static inline unsigned int snapshot_mrsw_int_size(snapshot_mrsw_int_t s)
{
SNAPSHOTI_SPMC_INT_CONTRACT(s);
return s->n - SNAPSHOTI_SPMC_EXTRA_BUFFER;
return s->n;
}
static inline unsigned int snapshot_mrsw_int_write_idx(snapshot_mrsw_int_t s, unsigned int idx)