search for: environ_t_iter

Displaying 3 results from an estimated 3 matches for "environ_t_iter".

2020 Apr 15
0
[PATCH nbdkit 6/9] common/utils: Add a copy_environ utility function.
...c: %m"); + goto error; + } + + found: ; + } + va_end (argp); + + /* Append a NULL pointer. */ + if (environ_t_append (&ret, NULL) == -1) { + nbdkit_error ("realloc: %m"); + goto error; + } + + /* Return the list of strings. */ + return ret.ptr; + + error: + environ_t_iter (&ret, (void *) free); + free (ret.ptr); + return NULL; +} -- 2.25.0
2020 Apr 15
2
Re: [PATCH nbdkit 6/9] common/utils: Add a copy_environ utility function.
...some platforms) > + > + /* Append a NULL pointer. */ > + if (environ_t_append (&ret, NULL) == -1) { > + nbdkit_error ("realloc: %m"); > + goto error; > + } > + > + /* Return the list of strings. */ > + return ret.ptr; > + > + error: > + environ_t_iter (&ret, (void *) free); > + free (ret.ptr); > + return NULL; > +} > Otherwise this looks like a nice addition. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
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.