]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/strbuf.c
Fix up according to Coding Style
[pulseaudio] / src / pulsecore / strbuf.c
index 8b952788648d10743cf8e4e0297db98fcca033f8..f131d5cdbb0f330208f0f6b7ba32bb7997038f3c 100644 (file)
@@ -5,7 +5,7 @@
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License,
+  by the Free Software Foundation; either version 2.1 of the License,
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
@@ -113,6 +113,13 @@ void pa_strbuf_puts(pa_strbuf *sb, const char *t) {
     pa_strbuf_putsn(sb, t, strlen(t));
 }
 
     pa_strbuf_putsn(sb, t, strlen(t));
 }
 
+/* Append a character to the string buffer */
+void pa_strbuf_putc(pa_strbuf *sb, char c) {
+    pa_assert(sb);
+
+    pa_strbuf_putsn(sb, &c, 1);
+}
+
 /* Append a new chunk to the linked list */
 static void append(pa_strbuf *sb, struct chunk *c) {
     pa_assert(sb);
 /* Append a new chunk to the linked list */
 static void append(pa_strbuf *sb, struct chunk *c) {
     pa_assert(sb);
@@ -139,7 +146,7 @@ void pa_strbuf_putsn(pa_strbuf *sb, const char *t, size_t l) {
     pa_assert(t);
 
     if (!l)
     pa_assert(t);
 
     if (!l)
-       return;
+        return;
 
     c = pa_xmalloc(PA_ALIGN(sizeof(struct chunk)) + l);
     c->length = l;
 
     c = pa_xmalloc(PA_ALIGN(sizeof(struct chunk)) + l);
     c->length = l;