[pulseaudio-commits] r1550 - /branches/lennart/src/pulse/utf8.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sat Jul 28 10:16:06 PDT 2007
Author: lennart
Date: Sat Jul 28 19:16:05 2007
New Revision: 1550
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1550&root=3Dpulseaudio&vi=
ew=3Drev
Log:
minor modernizations
Modified:
branches/lennart/src/pulse/utf8.c
Modified: branches/lennart/src/pulse/utf8.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulse/utf8=
.c?rev=3D1550&root=3Dpulseaudio&r1=3D1549&r2=3D1550&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulse/utf8.c (original)
+++ branches/lennart/src/pulse/utf8.c Sat Jul 28 19:16:05 2007
@@ -50,7 +50,6 @@
#include <config.h>
#endif
=
-#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <inttypes.h>
@@ -59,6 +58,8 @@
#ifdef HAVE_ICONV
#include <iconv.h>
#endif
+
+#include <pulsecore/macro.h>
=
#include "utf8.h"
#include "xmalloc.h"
@@ -207,10 +208,9 @@
=
inlen =3D len =3D strlen(str) + 1;
new_str =3D pa_xmalloc(len);
- assert(new_str);
-
- while (1) {
- inbuf =3D (ICONV_CONST char*)str; /* Brain dead prototype for icon=
v() */
+
+ for (;;) {
+ inbuf =3D (ICONV_CONST char*) str; /* Brain dead prototype for ico=
nv() */
inbytes =3D inlen;
outbuf =3D new_str;
outbytes =3D len;
@@ -226,11 +226,10 @@
break;
}
=
- assert(inbytes !=3D 0);
+ pa_assert(inbytes !=3D 0);
=
len +=3D inbytes;
new_str =3D pa_xrealloc(new_str, len);
- assert(new_str);
}
=
iconv_close(cd);
More information about the pulseaudio-commits
mailing list