qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH 3/3] Target-ppc: Remove unnecessa


From: Eric Blake
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 3/3] Target-ppc: Remove unnecessary variable
Date: Sat, 26 Sep 2015 10:15:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/25/2015 02:37 AM, Shraddha Barke wrote:
> Compress lines and remove the variable.
> 

> +++ b/target-ppc/kvm.c
> @@ -1782,8 +1782,7 @@ uint32_t kvmppc_get_tbfreq(void)
>  
>      ns++;
>  
> -    retval = atoi(ns);
> -    return retval;
> +    return atoi(ns);

atoi() is lousy; it cannot properly detect user input errors.  This
should probably be converted to use the appropriate qemu_strtol variant
instead.

-- 
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]