summaryrefslogtreecommitdiffstats
path: root/tx-pull.sh
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-13 08:19:11 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-13 08:19:11 +0000
commit14df5fa5d1731a502332e9d4a41f54ee3d4a4dac (patch)
tree72313cef36867c63ae09e1d23bcd5d7c380fdf88 /tx-pull.sh
parentd66dd2260c724bdfe57a8595aac37c8e9173cee5 (diff)
downloadlibguestfs-14df5fa5d1731a502332e9d4a41f54ee3d4a4dac.tar.gz
libguestfs-14df5fa5d1731a502332e9d4a41f54ee3d4a4dac.tar.xz
libguestfs-14df5fa5d1731a502332e9d4a41f54ee3d4a4dac.zip
daemon: Implement a growable strings buffer type.
Previously a lot of daemon code used three variables (a string list, 'int size' and 'int alloc') to track growable strings buffers. This commit implements a simple struct containing the same variables, but using size_t instead of int: struct stringsbuf { char **argv; size_t size; size_t alloc; }; Use it like this: DECLARE_STRINGSBUF (ret); //... if (add_string (&ret, str) == -1) return NULL; //... if (end_stringsbuf (&ret) == -1) return NULL; return ret.argv;
Diffstat (limited to 'tx-pull.sh')
0 files changed, 0 insertions, 0 deletions