[libvirt] [PATCHv2 09/10] xen: Use virStrToLong_i instead of sscanf for XenD port parsing

Eric Blake eblake at redhat.com
Wed Mar 31 22:40:04 UTC 2010


On 03/31/2010 03:42 PM, Matthias Bolte wrote:
> Parsing is stricter now and doesn't accept trailing characters
> after the actual value anymore.

> -        if (sscanf (p+1, "%d", &port_nr) != 1) {
> +        if (virStrToLong_i(p+1, NULL, 10, &port_nr) < 0) {

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100331/096d410d/attachment-0001.sig>


More information about the libvir-list mailing list