[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/8] 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 <george.dunlap@xxxxxxxxxx> --- CC: Ian Jackson <ian.jackson@xxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/xentrace/xenalyze.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 3c90a0f..33f8129 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 *)); -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |