[Top][All Lists]

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

Re: [Qemu-block] [v2 2/5] block/ssh: Add InetSocketAddress and accept it

From: Ashijeet Acharya
Subject: Re: [Qemu-block] [v2 2/5] block/ssh: Add InetSocketAddress and accept it
Date: Mon, 17 Oct 2016 21:38:02 +0530

On Mon, Oct 17, 2016 at 9:29 PM, Eric Blake <address@hidden> wrote:
> On 10/17/2016 10:44 AM, Ashijeet Acharya wrote:
>> I think, its better to keep using atoi() and check if it returns a '0'
> Please not atoi(), as it lacks sane error checking. It cannot tell the
> difference between '1' and '1garbage'.  It's obvious that you want to
> treat both '0' and 'name' as an error, but that is not the only error
> you want to flag, thus atoi() is insufficient to flag all the errors you
> want.
Okay, will using qemu_strtol() be any good as I think it has better
error handling support? Otherwise I will resort to passing -ve value
as Kevin suggested earlier.

> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]