]> git.ipfire.org Git - thirdparty/libvirt.git/commit
logical: Clean up allocation when building regex on the fly
authorJohn Ferlan <jferlan@redhat.com>
Mon, 1 Feb 2016 15:26:02 +0000 (10:26 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 2 Feb 2016 18:13:05 +0000 (13:13 -0500)
commit6ec319b84f67d72bf59fe7e0fd41d88ee9c393c7
tree256afdea952a499e812f5f62a39d1c2765e5bbfa
parentc6d526f33f0a46bea122cf0a6e61be73294502e7
logical: Clean up allocation when building regex on the fly

Rather than a loop reallocating space to build the regex, just allocate
it once up front, then if there's more than 1 nextent, append a comma and
another regex_unit string.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/storage/storage_backend_logical.c