qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCHv3 1/2] block/nfs: fix url parameter checking


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCHv3 1/2] block/nfs: fix url parameter checking
Date: Tue, 24 Jun 2014 17:26:52 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/24/2014 04:06 PM, Peter Lieven wrote:
> this patch fixes the incorrect usage of strncmp and
> adds simple error checking by means of parse_uint_full
> instead of atoi for the supplied URL parameters.
> 
> Signed-off-by: Peter Lieven <address@hidden>
> ---
>  block/nfs.c |   18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 

> +        if (parse_uint_full(qp->p[i].value, &val, 0)) {
> +            error_setg(errp, "Illegal value for NFS parameter: %s",

I prefer s/Illegal/Invalid/, as this is not a case of breaking a law.

But that's aesthetic.  Whether or not you tweak that choice of wording:

Reviewed-by: Eric Blake <address@hidden>

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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