19e7c04 util: fix two virCompareLimitUlong bugs

2 files Authored by Bing Bu Cao 10 years ago, Committed by ericb 10 years ago,
    util: fix two virCompareLimitUlong bugs
    
    The helper function virCompareLimitUlong compares limit values,
    where value of 0 is equal to unlimited. If the latter parameter is 0,
    it should return -1 instead of 1, hence the user can only set hard_limit when
    swap_hard_limit currently is unlimited.
    
    Worse, all callers pass 2 64-bit values, but on 32-bit platforms,
    the second argument was silently truncated to 32 bits, which
    could lead to incorrect computations.
    
    Signed-off-by: Bing Bu Cao <mars@linux.vnet.ibm.com>
    Signed-off-by: Eric Blake <eblake@redhat.com>
    
        
file modified
+4 -1
file modified
+1 -1