perf symbols: Fix inverted logic for showing kallsyms as the source of symbols
[safe/jmp/linux-2.6] / tools / perf / util / symbol.c
index b6ab23d..1270cf8 100644 (file)
@@ -345,10 +345,10 @@ void dso__sort_by_name(struct dso *self, enum map_type type)
                                     &self->symbols[type]);
 }
 
-int build_id__sprintf(u8 *self, int len, char *bf)
+int build_id__sprintf(const u8 *self, int len, char *bf)
 {
        char *bid = bf;
-       u8 *raw = self;
+       const u8 *raw = self;
        int i;
 
        for (i = 0; i < len; ++i) {
@@ -1671,7 +1671,7 @@ do_kallsyms:
 out_try_fixup:
        if (err > 0) {
 out_fixup:
-               if (kallsyms_filename == NULL)
+               if (kallsyms_filename != NULL)
                        dso__set_long_name(self, strdup("[kernel.kallsyms]"));
                map__fixup_start(map);
                map__fixup_end(map);