qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] slirp/arp_table.c: Avoid shifting into sign bit


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] slirp/arp_table.c: Avoid shifting into sign bit of signed integers
Date: Fri, 23 Aug 2013 10:42:47 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 08/23/2013 10:36 AM, Peter Maydell wrote:
> "0xf << 28" shifts right into the sign bit, since 0xf is a signed
> integer. Use the 'U' suffix to force an unsigned shift to avoid
> this undefined behaviour and a clang sanitizer warning.
> 
> Signed-off-by: Peter Maydell <address@hidden>
> ---
>  slirp/arp_table.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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]