creds-util: simplify offset calculation a bit
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Jan 2024 16:33:59 +0000 (17:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Jan 2024 13:16:18 +0000 (14:16 +0100)
commitcdbcb1fe6e7ab5ec001b81d99f6e2ae2f94e9604
tree567e332cff79907889fe0ab5a3cd1853ccd6e4eb
parentc5ff54c40ff416c9fff08af906f9c26881b6acaa
creds-util: simplify offset calculation a bit

Don't recalculate the overall offset entirely each time we process
another header. Instead, if we already validated an earlier offset, just
reuse the result, it's readily available in 'p'.

No change in behaviour, just a bit of code simplification.
src/shared/creds-util.c