Displaying 2 results from an estimated 2 matches for "append_padding".
2020 Apr 15
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
...zeof (struct region));
- if (p == NULL) {
+ if (regions_append (rs, region) == -1) {
nbdkit_error ("realloc: %m");
return -1;
}
- regions->regions = p;
- regions->regions[regions->nr_regions] = region;
- regions->nr_regions++;
return 0;
}
static int
-append_padding (struct regions *regions, uint64_t alignment)
+append_padding (regions *rs, uint64_t alignment)
{
struct region region;
assert (is_power_of_2 (alignment));
- region.start = virtual_size (regions);
+ region.start = virtual_size (rs);
if (IS_ALIGNED (region.start, alignment))
ret...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.