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

[Xen-changelog] [xen master] libxl: remove unsigned less-than-0 comparison



commit ce021b0df555c32f4c18ec2534f8f5b8c88e9066
Author:     Matthew Daley <mattd@xxxxxxxxxxx>
AuthorDate: Sun Dec 1 23:14:59 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Dec 2 12:01:59 2013 +0000

    libxl: remove unsigned less-than-0 comparison
    
    ...from libxl_cpuid_parse_config_xend. value is unsigned so this doesn't
    work, and either way the following comparison on it being bigger than 3
    does what was intended here anyway.
    
    Coverity-ID: 1055614
    Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_cpuid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c
index e1c406c..dd21b78 100644
--- a/tools/libxl/libxl_cpuid.c
+++ b/tools/libxl/libxl_cpuid.c
@@ -298,7 +298,7 @@ int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list 
*cpuid,
         }
         value = str[1] - 'a';
         endptr = strchr(str, '=');
-        if (value < 0 || value > 3 || endptr == NULL) {
+        if (value > 3 || endptr == NULL) {
             return 4;
         }
         str = endptr + 1;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.