diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-07-04 12:16:24 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-07-04 12:16:24 +0000 |
commit | 33b550e47ba63782f7a35af265b0b452a9c426dd (patch) | |
tree | cb3f4bd021fefa2177454fba9ac1e8282128eb44 | |
parent | f51260a65eaa73f60848903d2bf64abec8305a9b (diff) | |
download | samba-33b550e47ba63782f7a35af265b0b452a9c426dd.tar.gz samba-33b550e47ba63782f7a35af265b0b452a9c426dd.tar.bz2 samba-33b550e47ba63782f7a35af265b0b452a9c426dd.zip |
portability fixes
(This used to be commit 7a5c24c219d8b19f2c3cd11fdde3ebcede0646a2)
-rw-r--r-- | source3/lib/iconv.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c index 0b685d18ea..6dfdf3adf1 100644 --- a/source3/lib/iconv.c +++ b/source3/lib/iconv.c @@ -241,6 +241,7 @@ static size_t weird_pull(char **inbuf, size_t *inbytesleft, { while (*inbytesleft >= 1 && *outbytesleft >= 2) { int i; + int done = 0; for (i=0;weird_table[i].from;i++) { if (strncmp((*inbuf), weird_table[i].to, @@ -256,17 +257,18 @@ static size_t weird_pull(char **inbuf, size_t *inbytesleft, (*outbytesleft) -= 2; (*inbuf) += weird_table[i].len; (*outbuf) += 2; - goto next; + done = 1; + break; } } } + if (done) continue; (*outbuf)[0] = (*inbuf)[0]; (*outbuf)[1] = 0; (*inbytesleft) -= 1; (*outbytesleft) -= 2; (*inbuf) += 1; (*outbuf) += 2; - next: } if (*inbytesleft > 0) { @@ -284,6 +286,7 @@ static size_t weird_push(char **inbuf, size_t *inbytesleft, while (*inbytesleft >= 2 && *outbytesleft >= 1) { int i; + int done=0; for (i=0;weird_table[i].from;i++) { if ((*inbuf)[0] == weird_table[i].from && (*inbuf)[1] == 0) { @@ -297,17 +300,19 @@ static size_t weird_push(char **inbuf, size_t *inbytesleft, (*outbytesleft) -= weird_table[i].len; (*inbuf) += 2; (*outbuf) += weird_table[i].len; - goto next; + done = 1; + break; } } } + if (done) continue; + (*outbuf)[0] = (*inbuf)[0]; if ((*inbuf)[1]) ir_count++; (*inbytesleft) -= 2; (*outbytesleft) -= 1; (*inbuf) += 2; (*outbuf) += 1; - next: } if (*inbytesleft == 1) { |