search for: 076ae22

Displaying 4 results from an estimated 4 matches for "076ae22".

2019 Apr 24
0
[PATCH nbdkit 2/2] filters: Be careful to set *err if nbdkit_add_extent or nbdkit_extents_new fail.
...t;offset; - if (nbdkit_add_extent (extents, e.offset, e.length, e.type) == -1) + if (nbdkit_add_extent (extents, e.offset, e.length, e.type) == -1) { + *err = errno; return -1; + } } return 0; } diff --git a/filters/truncate/truncate.c b/filters/truncate/truncate.c index 076ae22..0c5dedb 100644 --- a/filters/truncate/truncate.c +++ b/filters/truncate/truncate.c @@ -319,6 +319,10 @@ truncate_extents (struct nbdkit_next_ops *next_ops, void *nxdata, * returned data to the original array. */ extents2 = nbdkit_extents_new (offset, real_size_copy); + if (extents2 ==...
2019 Apr 23
0
[nbdkit PATCH 2/4] filters: Utilize CLEANUP_EXTENTS_FREE
...gth, e.type) == -1) - goto error; + return -1; } - nbdkit_extents_free (extents2); return 0; - - error: - nbdkit_extents_free (extents2); - return -1; } static struct nbdkit_filter filter = { diff --git a/filters/truncate/truncate.c b/filters/truncate/truncate.c index dfc6873..076ae22 100644 --- a/filters/truncate/truncate.c +++ b/filters/truncate/truncate.c @@ -43,6 +43,7 @@ #include <nbdkit-filter.h> +#include "cleanup.h" #include "ispowerof2.h" #include "iszero.h" #include "rounding.h" @@ -292,7 +293,7 @@ truncate_extents (s...
2019 Apr 24
4
[PATCH nbdkit 2/2] filters: Be careful to set *err if nbdkit_add_extent or nbdkit_extents_new fail.
This fix isn't exhaustive but it fixes some obvious problems in the filters. Rich.
2019 Apr 23
8
[nbdkit PATCH 0/4] Start using cleanup macros in filters/plugins
There's more that can be done (in particular, use of CLEANUP_FREE), but this is enough to at least see if I'm on the right track. I couldn't figure out an obvious difference between common/include and common/utils, but it looks like the former is for things that are inlineable via .h only, while the latter is when you need to link in a convenience library, so this landed in the