diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-08-05 07:28:26 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-08-05 07:28:26 +0000 |
commit | 6fa7754a0a4f07871b05cee7e87e0f4aee607c07 (patch) | |
tree | e1d9d675388e4dccfbdc3fba134f7567b31a6c4b /lib/libkiconv | |
parent | d56cff8c3bfe30895bfe8d5e650e264f571ee142 (diff) | |
download | FreeBSD-src-6fa7754a0a4f07871b05cee7e87e0f4aee607c07.zip FreeBSD-src-6fa7754a0a4f07871b05cee7e87e0f4aee607c07.tar.gz |
Use char * when doing pointer arithmetics.
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 58d4ec8..db304c3 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); } |