Displaying 4 results from an estimated 4 matches for "a89dbec".
2019 Apr 24
0
[PATCH nbdkit 2/2] filters: Be careful to set *err if nbdkit_add_extent or nbdkit_extents_new fail.
...fset;
- 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/partition/partition.c b/filters/partition/partition.c
index a89dbec..a635df8 100644
--- a/filters/partition/partition.c
+++ b/filters/partition/partition.c
@@ -246,8 +246,10 @@ partition_extents (struct nbdkit_next_ops *next_ops, void *nxdata,
for (i = 0; i < nbdkit_extents_count (extents2); ++i) {
e = nbdkit_get_extent (extents2, i);
e.offset -= h-...
2019 Apr 23
0
[nbdkit PATCH 2/4] filters: Utilize CLEANUP_EXTENTS_FREE
...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/partition/partition.c b/filters/partition/partition.c
index ab692ba..a89dbec 100644
--- a/filters/partition/partition.c
+++ b/filters/partition/partition.c
@@ -41,6 +41,7 @@
#include <nbdkit-filter.h>
#include "byte-swapping.h"
+#include "cleanup.h"
#include "partition.h"
@@ -229,7 +230,7 @@ partition_extents (struct nbdkit_next_ops...
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