qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/20] host-utils: add ffsl


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 01/20] host-utils: add ffsl
Date: Wed, 12 Dec 2012 16:41:51 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/12/2012 06:46 AM, Paolo Bonzini wrote:
> We can provide fast versions based on the other functions defined
> by host-utils.h.  Some care is required on glibc, which provides
> ffsl already.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  host-utils.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/host-utils.h b/host-utils.h
> index 821db93..231d580 100644
> --- a/host-utils.h
> +++ b/host-utils.h
> @@ -24,6 +24,7 @@
>   */
>  
>  #include "compiler.h"   /* QEMU_GNUC_PREREQ */
> +#include <string.h>     /* ffsl */

I never really understood why ffs() is in <strings.h> but ffsl() is in
<string.h>, especially when neither function deals with strings (a
<bitops.h> header would have made more sense), but such is life.

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