[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH nbdkit v2] common/bitmap: Don't fail on realloc (ptr, 0)



v1 was here:
https://www.redhat.com/archives/libguestfs/2019-September/msg00100.html

In v2 I've changed the patch so it avoids calling realloc at all in
this case.

The patch is a bit longer this way.  But I don't see any other
alternative if we are to avoid having a "realloc wrapper" of some kind
that we use everywhere, which I guess we should avoid because it makes
plugins just that bit harder to write and we want them to be as easy
to write and accessible as possible.

Also:

 - Clean up the commit message.

 - Add a simple regression test.

Rich.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]