[libvirt] [PATCHv2] Introduce virStringStripIPv6Brackets
Eric Blake
eblake at redhat.com
Wed Oct 8 15:42:54 UTC 2014
On 10/08/2014 04:31 AM, Ján Tomko wrote:
> Helper function to strip the brackets from an IPv6 address.
> Tested by viruritest.
> ---
> src/libvirt_private.syms | 1 +
> src/util/virstring.c | 22 ++++++++++++++++++++++
> src/util/virstring.h | 2 ++
> src/util/viruri.c | 20 ++++----------------
> tests/virstringtest.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 78 insertions(+), 16 deletions(-)
>
> return virBufferContentAndReset(&buf);
> }
> +
> +/**
Two blank lines between functions seems to be the prevailing style.
> + len = strlen(str);
> + if (str[0] == '[' && str[len-1] == ']' && strchr(str, ':')) {
Spaces around '-'
ACK with those tweaks
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141008/a9213a61/attachment-0001.sig>
More information about the libvir-list
mailing list