Re: [PATCH 4/6] pack-bitmap.c: factor out manual `map_pos` manipulation
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 24, 2023, 23:24 UTC
- Message-ID
- <ZB4xEO82vTp6yTfx@nand.local>
- In-Reply-To
- <ZB4ujCTiRgAmZaQo@nand.local>
On Fri, Mar 24, 2023 at 07:13:16PM -0400, Taylor Blau wrote:
Show 8 quoted lines
> > Would it make sense to return an 'int' instead of the size_t of map_pos? > > That way we could return in error if this is exceeded, and then all > > callers can respond "oh wait, that move would exceed the file size, so > > I should fail in my own way..."? > > Works for me. I think bitmap_index_seek_to() would probably return the > error() itself, since I don't think it makes sense to require each > caller to come up with the same "bitmap position exceeds size" thing.
Actually, I take that back. See my response lower in this thread:
https://lore.kernel.org/git/ZB4w2gCo/qPCmWkz@nand.local/
Thanks, Taylor