diff options
| author | Stefan Farfeleder <stefanf@FreeBSD.org> | 2005-08-05 07:28:26 +0000 |
|---|---|---|
| committer | Stefan Farfeleder <stefanf@FreeBSD.org> | 2005-08-05 07:28:26 +0000 |
| commit | add8fae07c0ae50cb1bed5edf4f6edc8d9e57cc7 (patch) | |
| tree | e1d9d675388e4dccfbdc3fba134f7567b31a6c4b /lib/libkiconv | |
| parent | 150a210073821ced6ef7bf8720e5f5dc1cc71c30 (diff) | |
Notes
Diffstat (limited to 'lib/libkiconv')
| -rw-r--r-- | lib/libkiconv/xlat16_iconv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libkiconv/xlat16_iconv.c b/lib/libkiconv/xlat16_iconv.c index 58d4ec8a0e7b..db304c3a4218 100644 --- a/lib/libkiconv/xlat16_iconv.c +++ b/lib/libkiconv/xlat16_iconv.c @@ -70,7 +70,8 @@ kiconv_add_xlat16_cspair(const char *tocode, const char *fromcode, int flag) size_t i, size, idxsize; struct iconv_cspair_info *csi; struct xlat16_table xt; - void *data, *p; + void *data; + char *p; if (sysctlbyname("kern.iconv.cslist", NULL, &size, NULL, 0) == -1) return (-1); @@ -141,7 +142,7 @@ kiconv_xlat16_open(const char *tocode, const char *fromcode, int lcase) struct xlat16_table xt; struct quirk_replace_list *pre_q_list, *post_q_list; iconv_t cd; - void *p; + char *p; xt.data = NULL; xt.size = 0; @@ -251,7 +252,7 @@ kiconv_xlat16_open(const char *tocode, const char *fromcode, int lcase) } my_iconv_close(cd); - xt.size = p - xt.data; + xt.size = p - (char *)xt.data; xt.data = realloc(xt.data, xt.size); return (xt); } |
