diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-01-23 09:43:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-01-23 09:43:49 +0000 |
commit | 256846bb65357d2d564ec394394c235408eaf4a7 (patch) | |
tree | d3cf11f4e515f552a0d2fcd01e5137c324b89de3 /iconv | |
parent | d480547e995bccb6c33a166869897dd396357cef (diff) | |
download | glibc-256846bb65357d2d564ec394394c235408eaf4a7.tar glibc-256846bb65357d2d564ec394394c235408eaf4a7.tar.gz glibc-256846bb65357d2d564ec394394c235408eaf4a7.tar.bz2 glibc-256846bb65357d2d564ec394394c235408eaf4a7.zip |
Update.
1998-12-29 Geoff Keating <geoffk@ozemail.com.au>
* sunrpc/Versions: Include _authenticate, it's defined in a user
header (in fact, it's the whole contents of rpc/svc_auth.h).
1999-01-23 Ulrich Drepper <drepper@cygnus.com>
* io/ftw.c (process_entry): Initialize flag since not all gcc
versions are smart enough to see that this is no problem.
* elf/dl-open.c (_dl_init_paths): Check malloc result.
* csu/Versions: Add __frame_state_for.
Diffstat (limited to 'iconv')
-rw-r--r-- | iconv/gconv_conf.c | 6 | ||||
-rw-r--r-- | iconv/iconv_open.c | 15 |
2 files changed, 11 insertions, 10 deletions
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index 307bf8a274..ece63354da 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -177,12 +177,12 @@ add_alias (char *rp, void *modules) ++rp; from = wp = rp; while (*rp != '\0' && !isspace (*rp)) - *wp = toupper (*rp++); + *wp++ = toupper (*rp++); if (*rp == '\0') /* There is no `to' string on the line. Ignore it. */ return; - *rp++ = '\0'; - to = wp = rp; + *wp++ = '\0'; + to = ++rp; while (isspace (*rp)) ++rp; while (*rp != '\0' && !isspace (*rp)) diff --git a/iconv/iconv_open.c b/iconv/iconv_open.c index 49576fd508..51dcf0baaa 100644 --- a/iconv/iconv_open.c +++ b/iconv/iconv_open.c @@ -53,12 +53,12 @@ strip (char *wp, const char *s) static char * -upstr (char *str) +upstr (char *dst, const char *str) { - char *cp = str; - while ((*cp = toupper (*cp)) != '\0') - ++cp; - return str; + char *cp = dst; + while ((*cp++ = toupper (*str++)) != '\0') + /* nothing */; + return dst; } @@ -77,12 +77,13 @@ iconv_open (const char *tocode, const char *fromcode) tocode_len = strlen (tocode); tocode_conv = alloca (tocode_len + 3); strip (tocode_conv, tocode); - tocode = tocode_conv[2] == '\0' ? upstr (tocode) : tocode_conv; + tocode = tocode_conv[2] == '\0' ? upstr (tocode_conv, tocode) : tocode_conv; fromcode_len = strlen (fromcode); fromcode_conv = alloca (fromcode_len + 3); strip (fromcode_conv, fromcode); - fromcode = romcode_conv[2] == '\0' ? upstr (fromcode) : fromcode_conv; + fromcode = (fromcode_conv[2] == '\0' + ? upstr (fromcode_conv, fromcode) : fromcode_conv); res = __gconv_open (tocode, fromcode, &cd); |