]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/strlist.c
dbus: memory leak, actually free dbus wrapper
[pulseaudio] / src / pulsecore / strlist.c
index 792af0ff897121cf1d797a23092ba13085046cec..cbafbba6b451d32b553596fc537cfe3acb522646 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /***
   This file is part of PulseAudio.
 
 /***
   This file is part of PulseAudio.
 
@@ -7,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
@@ -146,3 +144,18 @@ pa_strlist* pa_strlist_parse(const char *s) {
 
     return head;
 }
 
     return head;
 }
+
+pa_strlist *pa_strlist_reverse(pa_strlist *l) {
+    pa_strlist *r = NULL;
+
+    while (l) {
+        pa_strlist *n;
+
+        n = l->next;
+        l->next = r;
+        r = l;
+        l = n;
+    }
+
+    return r;
+}