From 1f0961368f58a9fec319d86c79a86a9f0d008cf5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Jan 2006 01:17:39 +0000 Subject: * remove a lot of compiler warnings introduced by using some new GCC flags * add typedefs for public structs and enums and drop the struct/enum prefixs from all uses where it makes sense git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@447 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/strbuf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'polyp/strbuf.c') diff --git a/polyp/strbuf.c b/polyp/strbuf.c index 1aa710ea..aa20218a 100644 --- a/polyp/strbuf.c +++ b/polyp/strbuf.c @@ -46,14 +46,14 @@ struct pa_strbuf { struct chunk *head, *tail; }; -struct pa_strbuf *pa_strbuf_new(void) { - struct pa_strbuf *sb = pa_xmalloc(sizeof(struct pa_strbuf)); +pa_strbuf *pa_strbuf_new(void) { + pa_strbuf *sb = pa_xmalloc(sizeof(pa_strbuf)); sb->length = 0; sb->head = sb->tail = NULL; return sb; } -void pa_strbuf_free(struct pa_strbuf *sb) { +void pa_strbuf_free(pa_strbuf *sb) { assert(sb); while (sb->head) { struct chunk *c = sb->head; @@ -66,7 +66,7 @@ void pa_strbuf_free(struct pa_strbuf *sb) { /* Make a C string from the string buffer. The caller has to free * string with pa_xfree(). */ -char *pa_strbuf_tostring(struct pa_strbuf *sb) { +char *pa_strbuf_tostring(pa_strbuf *sb) { char *t, *e; struct chunk *c; assert(sb); @@ -88,7 +88,7 @@ char *pa_strbuf_tostring(struct pa_strbuf *sb) { } /* Combination of pa_strbuf_free() and pa_strbuf_tostring() */ -char *pa_strbuf_tostring_free(struct pa_strbuf *sb) { +char *pa_strbuf_tostring_free(pa_strbuf *sb) { char *t; assert(sb); t = pa_strbuf_tostring(sb); @@ -97,13 +97,13 @@ char *pa_strbuf_tostring_free(struct pa_strbuf *sb) { } /* Append a string to the string buffer */ -void pa_strbuf_puts(struct pa_strbuf *sb, const char *t) { +void pa_strbuf_puts(pa_strbuf *sb, const char *t) { assert(sb && t); pa_strbuf_putsn(sb, t, strlen(t)); } /* Append a new chunk to the linked list */ -static void append(struct pa_strbuf *sb, struct chunk *c) { +static void append(pa_strbuf *sb, struct chunk *c) { assert(sb && c); if (sb->tail) { @@ -120,7 +120,7 @@ static void append(struct pa_strbuf *sb, struct chunk *c) { } /* Append up to l bytes of a string to the string buffer */ -void pa_strbuf_putsn(struct pa_strbuf *sb, const char *t, size_t l) { +void pa_strbuf_putsn(pa_strbuf *sb, const char *t, size_t l) { struct chunk *c; assert(sb && t); @@ -136,7 +136,7 @@ void pa_strbuf_putsn(struct pa_strbuf *sb, const char *t, size_t l) { /* Append a printf() style formatted string to the string buffer. */ /* The following is based on an example from the GNU libc documentation */ -int pa_strbuf_printf(struct pa_strbuf *sb, const char *format, ...) { +int pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) { int size = 100; struct chunk *c = NULL; -- cgit