search for: a9759ec4

Displaying 2 results from an estimated 2 matches for "a9759ec4".

2020 Apr 15
0
[PATCH nbdkit 7/9] common/utils: Add CLEANUP_FREE_STRING_LIST macro.
...char ***ptr); +#define CLEANUP_FREE_STRING_LIST __attribute__((cleanup (cleanup_free_string_list))) + extern void cleanup_unlock (pthread_mutex_t **ptr); #define CLEANUP_UNLOCK __attribute__((cleanup (cleanup_unlock))) diff --git a/common/utils/cleanup.c b/common/utils/cleanup.c index fb77805b..a9759ec4 100644 --- a/common/utils/cleanup.c +++ b/common/utils/cleanup.c @@ -44,6 +44,19 @@ cleanup_free (void *ptr) free (* (void **) ptr); } +void +cleanup_free_string_list (char ***ptr) +{ + size_t i; + char **argv = *ptr; + + if (argv == NULL) return; + + for (i = 0; argv[i] != NULL; ++i) +...
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.