From: George Dunlap Date: Thu, 25 Feb 2016 14:48:57 +0000 (+0000) Subject: tools/xenalyze: Avoid redundant check X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1b1ef6ac2acd025a3e00a51fe95994531f623d80;p=people%2Fliuw%2Fxen.git tools/xenalyze: Avoid redundant check 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 Acked-by: Ian Jackson --- diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 3c90a0f5d7..33f812919b 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -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 *));