[pulseaudio-commits] r2364 - /branches/coling/airtunes/src/modules/rtp/base64.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon May 5 17:14:34 PDT 2008


Author: coling
Date: Tue May  6 02:14:33 2008
New Revision: 2364

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2364&root=pulseaudio&view=rev
Log:
Trivial change to allocate memory using pulse methods.

Modified:
    branches/coling/airtunes/src/modules/rtp/base64.c

Modified: branches/coling/airtunes/src/modules/rtp/base64.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/coling/airtunes/src/modules/rtp/base64.c?rev=2364&root=pulseaudio&r1=2363&r2=2364&view=diff
==============================================================================
--- branches/coling/airtunes/src/modules/rtp/base64.c (original)
+++ branches/coling/airtunes/src/modules/rtp/base64.c Tue May  6 02:14:33 2008
@@ -33,6 +33,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <pulse/xmalloc.h>
+
 #include "base64.h"
 
 static char base64_chars[] =
@@ -54,9 +56,7 @@
     int c;
     const unsigned char *q;
 
-    p = s = (char *) malloc(size * 4 / 3 + 4);
-    if (p == NULL)
-        return -1;
+    p = s = pa_xnew(char, size * 4 / 3 + 4);
     q = (const unsigned char *) data;
     i = 0;
     for (i = 0; i < size;) {




More information about the pulseaudio-commits mailing list