diff options
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 5dd83c3e2c0c..c0a028c3ebaf 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include <dirent.h> | 1 | #include <dirent.h> |
2 | #include <errno.h> | 2 | #include <errno.h> |
3 | #include <libgen.h> | ||
4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
5 | #include <stdio.h> | 4 | #include <stdio.h> |
6 | #include <string.h> | 5 | #include <string.h> |
@@ -51,6 +50,8 @@ struct symbol_conf symbol_conf = { | |||
51 | 50 | ||
52 | int dso__name_len(const struct dso *dso) | 51 | int dso__name_len(const struct dso *dso) |
53 | { | 52 | { |
53 | if (!dso) | ||
54 | return strlen("[unknown]"); | ||
54 | if (verbose) | 55 | if (verbose) |
55 | return dso->long_name_len; | 56 | return dso->long_name_len; |
56 | 57 | ||