diff options
| author | Lennart Poettering <lennart@poettering.net> | 2007-07-28 17:16:05 +0000 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2007-07-28 17:16:05 +0000 | 
| commit | c7df4ba6c3f9b0f63e45505c53879cab11c0d696 (patch) | |
| tree | e2d211ff7c41cf617589bd5d80e1496d844afd35 /src/pulse/utf8.c | |
| parent | 8e4660a0b5b34ae465fa3765c68dd8f2d276956f (diff) | |
minor modernizations
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1550 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulse/utf8.c')
| -rw-r--r-- | src/pulse/utf8.c | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c index 923e021d..a179b3fc 100644 --- a/src/pulse/utf8.c +++ b/src/pulse/utf8.c @@ -50,7 +50,6 @@  #include <config.h>  #endif -#include <assert.h>  #include <errno.h>  #include <stdlib.h>  #include <inttypes.h> @@ -60,6 +59,8 @@  #include <iconv.h>  #endif +#include <pulsecore/macro.h> +  #include "utf8.h"  #include "xmalloc.h" @@ -207,10 +208,9 @@ static char* iconv_simple(const char *str, const char *to, const char *from) {      inlen = len = strlen(str) + 1;      new_str = pa_xmalloc(len); -    assert(new_str); -    while (1) { -        inbuf = (ICONV_CONST char*)str; /* Brain dead prototype for iconv() */ +    for (;;) { +        inbuf = (ICONV_CONST char*) str; /* Brain dead prototype for iconv() */          inbytes = inlen;          outbuf = new_str;          outbytes = len; @@ -226,11 +226,10 @@ static char* iconv_simple(const char *str, const char *to, const char *from) {              break;          } -        assert(inbytes != 0); +        pa_assert(inbytes != 0);          len += inbytes;          new_str = pa_xrealloc(new_str, len); -        assert(new_str);      }      iconv_close(cd);  | 
