Re: [PATCHv2] Introduce virStringStripIPv6Brackets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]