From 256846bb65357d2d564ec394394c235408eaf4a7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 23 Jan 1999 09:43:49 +0000 Subject: Update. 1998-12-29 Geoff Keating * 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 * 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. --- iconv/gconv_conf.c | 6 +++--- iconv/iconv_open.c | 15 ++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'iconv') 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); -- cgit 1.4.1