]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
analyzer: Remove unnecessary list_empty() check
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Thu, 19 Aug 2010 20:24:40 +0000 (23:24 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Thu, 19 Aug 2010 20:24:40 +0000 (23:24 +0300)
This is not needed since list_for_each_entry() will handle empty lists
just fine.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
analyze.c

index 6d65f02a751fa8b4a31b83e55a4ff8f8925bb167..0e4982b900833e392125a520d2509c26e1a6b792 100644 (file)
--- a/analyze.c
+++ b/analyze.c
@@ -42,9 +42,6 @@ static void count_pages(struct bintree *b, struct bintree_ops *ops)
        struct maps_list *ml;
 
        if (af->pid) {
        struct maps_list *ml;
 
        if (af->pid) {
-               if (list_empty(&pf->ml)) {
-                       return;
-               }
                list_for_each_entry(ml, &pf->ml, list) {
                        if (ml->map->pid == af->pid)
                                goto get_stats;
                list_for_each_entry(ml, &pf->ml, list) {
                        if (ml->map->pid == af->pid)
                                goto get_stats;