diff options
Diffstat (limited to 'tools/perf/util/strbuf.h')
-rw-r--r-- | tools/perf/util/strbuf.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/strbuf.h b/tools/perf/util/strbuf.h index 9ee908a3ec5d..d2aa86c014c1 100644 --- a/tools/perf/util/strbuf.h +++ b/tools/perf/util/strbuf.h | |||
@@ -50,7 +50,7 @@ struct strbuf { | |||
50 | #define STRBUF_INIT { 0, 0, strbuf_slopbuf } | 50 | #define STRBUF_INIT { 0, 0, strbuf_slopbuf } |
51 | 51 | ||
52 | /*----- strbuf life cycle -----*/ | 52 | /*----- strbuf life cycle -----*/ |
53 | extern void strbuf_init(struct strbuf *, size_t); | 53 | extern void strbuf_init(struct strbuf *buf, ssize_t hint); |
54 | extern void strbuf_release(struct strbuf *); | 54 | extern void strbuf_release(struct strbuf *); |
55 | extern char *strbuf_detach(struct strbuf *, size_t *); | 55 | extern char *strbuf_detach(struct strbuf *, size_t *); |
56 | extern void strbuf_attach(struct strbuf *, void *, size_t, size_t); | 56 | extern void strbuf_attach(struct strbuf *, void *, size_t, size_t); |
@@ -61,7 +61,7 @@ static inline void strbuf_swap(struct strbuf *a, struct strbuf *b) { | |||
61 | } | 61 | } |
62 | 62 | ||
63 | /*----- strbuf size related -----*/ | 63 | /*----- strbuf size related -----*/ |
64 | static inline size_t strbuf_avail(const struct strbuf *sb) { | 64 | static inline ssize_t strbuf_avail(const struct strbuf *sb) { |
65 | return sb->alloc ? sb->alloc - sb->len - 1 : 0; | 65 | return sb->alloc ? sb->alloc - sb->len - 1 : 0; |
66 | } | 66 | } |
67 | 67 | ||
@@ -122,9 +122,9 @@ extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...); | |||
122 | 122 | ||
123 | extern size_t strbuf_fread(struct strbuf *, size_t, FILE *); | 123 | extern size_t strbuf_fread(struct strbuf *, size_t, FILE *); |
124 | /* XXX: if read fails, any partial read is undone */ | 124 | /* XXX: if read fails, any partial read is undone */ |
125 | extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint); | 125 | extern ssize_t strbuf_read(struct strbuf *, int fd, ssize_t hint); |
126 | extern int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint); | 126 | extern int strbuf_read_file(struct strbuf *sb, const char *path, ssize_t hint); |
127 | extern int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint); | 127 | extern int strbuf_readlink(struct strbuf *sb, const char *path, ssize_t hint); |
128 | 128 | ||
129 | extern int strbuf_getline(struct strbuf *, FILE *, int); | 129 | extern int strbuf_getline(struct strbuf *, FILE *, int); |
130 | 130 | ||