* value cannot be produced after initialization.
*/
if (unlikely(ds->ofs == ~0)) {
- ds->ofs = 0;
-
- HA_ATOMIC_INC(b_peek(buf, ds->ofs));
+ ds->ofs = b_peek_ofs(buf, 0);
+ HA_ATOMIC_INC(b_orig(buf) + ds->ofs);
}
/* in this loop, ofs always points to the counter byte that precedes
* value cannot be produced after initialization.
*/
if (unlikely(dss->ofs_req == ~0)) {
- dss->ofs_req = 0;
- HA_ATOMIC_INC(b_peek(buf, dss->ofs_req));
+ dss->ofs_req = b_peek_ofs(buf, 0);
+ HA_ATOMIC_INC(b_orig(buf) + dss->ofs_req);
}
/* we were already there, adjust the offset to be relative to