2bd61c8 virSocketAddrIsPrivate: Work on 32bits platforms

Authored and Committed by mprivozn 7 years ago
    virSocketAddrIsPrivate: Work on 32bits platforms
    
    Yet another one of those where signed int (or long int) is not
    enough. And useless to as we're aiming at unsigned anyway.
    
    ../../src/util/virsocketaddr.c: In function 'virSocketAddrIsPrivate':
    ../../src/util/virsocketaddr.c:289:45: error: result of '192l << 24' requires 33 bits to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
            return ((val & 0xFFFF0000) == ((192L << 24) + (168 << 16)) ||
                                                 ^~
    ../../src/util/virsocketaddr.c:290:45: error: result of '172l << 24' requires 33 bits to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
                    (val & 0xFFF00000) == ((172L << 24) + (16  << 16)) ||
                                                 ^~
    cc1: all warnings being treated as errors
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    
        
file modified
+3 -3