summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-29 14:51:39 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-29 14:51:46 +0300
commit88b3423889764791a37c17b8f5205577a53fd029 (patch)
treecf80206d638a936b0344451a845920dc9056ee89
parent3263f4b47a7145e255563aa6970d0c248f7f1ca6 (diff)
downloadapt-88b3423889764791a37c17b8f5205577a53fd029.tar.gz
Fix iconv
Would need to test iconv prototype.
-rw-r--r--apt-pkg/contrib/strutl.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 70befdc48..9804c8e60 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -153,8 +153,8 @@ size_t DisplayLength(StringView str)
bool UTF8ToCodeset(const char *codeset, const string &orig, string *dest)
{
iconv_t cd;
- const char *inbuf;
- char *inptr, *outbuf;
+ const char *inptr;
+ char *outbuf;
size_t insize, bufsize;
dest->clear();
@@ -171,8 +171,7 @@ bool UTF8ToCodeset(const char *codeset, const string &orig, string *dest)
}
insize = bufsize = orig.size();
- inbuf = orig.data();
- inptr = (char *)inbuf;
+ inptr = orig.data();
outbuf = new char[bufsize];
size_t lastError = -1;