]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
tools/xenalyze: Avoid redundant check
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 25 Feb 2016 14:48:57 +0000 (14:48 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 15 Mar 2016 16:32:32 +0000 (16:32 +0000)
Coverity notices that if !head is true, that !N can never be true.

Don't bother checking N, since we know it has to be at least one.

CID 1354243

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xentrace/xenalyze.c

index 3c90a0f5d77bfa8683a96e6670e2ff23a261b982..33f812919b9abf7bc867cfe65a1e44bc4c5d6f1f 100644 (file)
@@ -4146,9 +4146,6 @@ void cr3_dump_list(struct cr3_value_struct *head){
     for(p=head; p; p=p->next)
         N++;
 
-    if(!N)
-        return;
-
     /* Alloc a struct of the right size */
     qsort_array = malloc(N * sizeof(struct eip_list_struct *));