diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-03-23 16:56:56 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-03-23 17:09:53 -0300 |
commit | 0741208a7cd4fc651316f1f861ad9e83495765fc (patch) | |
tree | 4df8373c3b525021e74395e0dc6ed6cdc1cb83f7 /tools/perf/util/strbuf.c | |
parent | 88fd633cdfa19060a6575b1d53c55c14b11e4fe8 (diff) | |
download | linux-0741208a7cd4fc651316f1f861ad9e83495765fc.tar.gz linux-0741208a7cd4fc651316f1f861ad9e83495765fc.tar.bz2 linux-0741208a7cd4fc651316f1f861ad9e83495765fc.zip |
perf tools: Unexport some methods unused outside strbuf.c
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-nq1wvtky4mpu0nupjyar7sbw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/strbuf.c')
-rw-r--r-- | tools/perf/util/strbuf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c index d3d279275432..8fb73295ec34 100644 --- a/tools/perf/util/strbuf.c +++ b/tools/perf/util/strbuf.c @@ -51,6 +51,13 @@ void strbuf_grow(struct strbuf *sb, size_t extra) ALLOC_GROW(sb->buf, sb->len + extra + 1, sb->alloc); } +void strbuf_addch(struct strbuf *sb, int c) +{ + strbuf_grow(sb, 1); + sb->buf[sb->len++] = c; + sb->buf[sb->len] = '\0'; +} + void strbuf_add(struct strbuf *sb, const void *data, size_t len) { strbuf_grow(sb, len); @@ -58,7 +65,7 @@ void strbuf_add(struct strbuf *sb, const void *data, size_t len) strbuf_setlen(sb, sb->len + len); } -void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap) +static void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap) { int len; va_list ap_saved; |