netns xfrm: fix "ip xfrm state|policy count" misreport
[safe/jmp/linux-2.6] / scripts / kallsyms.c
index 3cb5789..86c3896 100644 (file)
@@ -167,11 +167,11 @@ static int symbol_valid_tr(struct sym_entry *s)
        for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) {
                tr = &text_ranges[i];
 
-               if (s->addr >= tr->start && s->addr < tr->end)
-                       return 0;
+               if (s->addr >= tr->start && s->addr <= tr->end)
+                       return 1;
        }
 
-       return 1;
+       return 0;
 }
 
 static int symbol_valid(struct sym_entry *s)
@@ -585,7 +585,7 @@ static int prefix_underscores_count(const char *str)
 {
        const char *tail = str;
 
-       while (*tail != '_')
+       while (*tail == '_')
                tail++;
 
        return tail - str;