diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-28 12:46:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:55 -0500 |
commit | e481385391a25c19d82ce93fbec11a973cf82e9f (patch) | |
tree | f4ecdd6d87a17cb7b5f8f35f97d27bc9090f23ec /source4/lib | |
parent | 6feaf6d4d60f64558190965f55b09457e940e596 (diff) | |
download | samba-e481385391a25c19d82ce93fbec11a973cf82e9f.tar.gz samba-e481385391a25c19d82ce93fbec11a973cf82e9f.tar.bz2 samba-e481385391a25c19d82ce93fbec11a973cf82e9f.zip |
r3322: fixed a bunch of warnings in the build, including one case where it was a real bug
(This used to be commit 02d5d0f685e44bd66aff4a007f0bf34c8f915574)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/iconv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/lib/iconv.c b/source4/lib/iconv.c index f4f7660bcd..3cca734d7b 100644 --- a/source4/lib/iconv.c +++ b/source4/lib/iconv.c @@ -131,7 +131,6 @@ size_t smb_iconv(smb_iconv_t cd, char **outbuf, size_t *outbytesleft) { char cvtbuf[2048]; - char *bufp = cvtbuf; size_t bufsize; /* in many cases we can go direct */ @@ -143,18 +142,19 @@ size_t smb_iconv(smb_iconv_t cd, /* otherwise we have to do it chunks at a time */ while (*inbytesleft > 0) { - bufp = cvtbuf; + char *bufp1 = cvtbuf; + const char *bufp2 = cvtbuf; + bufsize = sizeof(cvtbuf); if (cd->pull(cd->cd_pull, - inbuf, inbytesleft, &bufp, &bufsize) == -1 + inbuf, inbytesleft, &bufp1, &bufsize) == -1 && errno != E2BIG) return -1; - bufp = cvtbuf; bufsize = sizeof(cvtbuf) - bufsize; if (cd->push(cd->cd_push, - &bufp, &bufsize, + &bufp2, &bufsize, outbuf, outbytesleft) == -1) return -1; } |