diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2015-12-15 18:39:38 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-12-17 20:27:10 +0300 |
commit | 2f4ce5ec1d447beb42143a9653716a2ab025161e (patch) | |
tree | 97c7c5342f217383a7fefc579ad16f8da62bb6a2 /tools/perf/util/util.h | |
parent | 46113a54be53aea50a4f5926b87e86e2e66c4266 (diff) | |
download | linux-2f4ce5ec1d447beb42143a9653716a2ab025161e.tar.xz |
perf tools: Finalize subcmd independence
For the files that will be moved to the subcmd library, remove all their
perf-specific includes and duplicate any needed functionality.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/6e12946f0f26ce4d543d34db68d9dae3c8551cb9.1450193761.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r-- | tools/perf/util/util.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 150858f3b4f0..4b519c59bdc3 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -151,12 +151,6 @@ extern void set_warning_routine(void (*routine)(const char *err, va_list params) extern int prefixcmp(const char *str, const char *prefix); extern void set_buildid_dir(const char *dir); -static inline const char *skip_prefix(const char *str, const char *prefix) -{ - size_t len = strlen(prefix); - return strncmp(str, prefix, len) ? NULL : str + len; -} - #ifdef __GLIBC_PREREQ #if __GLIBC_PREREQ(2, 1) #define HAVE_STRCHRNUL @@ -187,14 +181,6 @@ static inline void *zalloc(size_t size) #define zfree(ptr) ({ free(*ptr); *ptr = NULL; }) -static inline int has_extension(const char *filename, const char *ext) -{ - size_t len = strlen(filename); - size_t extlen = strlen(ext); - - return len > extlen && !memcmp(filename + len - extlen, ext, extlen); -} - /* Sane ctype - no locale, and works with signed chars */ #undef isascii #undef isspace |