Ingo Schwarze wrote:
> > this could just be memcmp.
>
> I avoided that over quibbles about the argument type (off_t vs.
> size_t), though i admit that database files larger than a Gigabyte
> make no sense at all.
>
> If you consider that an improvement, i'm not opposed to using
> memcmp(3). But i don't really have a good idea what to do if
> st_size does happen to exceed SIZE_MAX. Maybe just error out?
in that case, you have already failed to mmap it, so i wouldn't worry too
much.
No comments:
Post a Comment