aboutsummaryrefslogtreecommitdiff
path: root/iconv/gconv_open.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-11-24 02:08:40 +0000
committerUlrich Drepper <drepper@redhat.com>1997-11-24 02:08:40 +0000
commite34b0f2902588bbbfaf55829692e32c3c7134b74 (patch)
tree3d74df649b5b0bf80b4f6070e360f405516caec5 /iconv/gconv_open.c
parentf43ce637b5f35b350b4dff6810dd6a7421fbb952 (diff)
downloadglibc-e34b0f2902588bbbfaf55829692e32c3c7134b74.zip
glibc-e34b0f2902588bbbfaf55829692e32c3c7134b74.tar.gz
glibc-e34b0f2902588bbbfaf55829692e32c3c7134b74.tar.bz2
1997-11-24 03:01 Ulrich Drepper <drepper@cygnus.com> * elf/dl-support.c: Call __libc_init_secure to make sure __libc_enable_secure is defined early. * sysdeps/generic/enbl-secure.c: Change function name to __libc_init_secure and make it global instead of a constructor. * iconv/gconv.c: Fix lots of bugs. * iconv/gconv.h: Likewise. * iconv/gconv_builtin.h: Likewise. * iconv/gconv_close.c: Likewise. * iconv/gconv_conf.c: Likewise. * iconv/gconv_db.c: Likewise. * iconv/gconv_dl.c: Likewise. * iconv/gconv_open.c: Likewise. * iconv/gconv_simple.c: Likewise. * iconv/iconv.c: Likewise. * iconv/iconv_close.c: Likewise. * iconv/iconv_open.c: Likewise. * wcsmbs/Makefile (routines): Add wmemrtowcs and wmemrtombs. * wcsmbs/wchar.h: Add prototypes for wmemrtowcs and wmemrtombs. * wcsmbs/wmemrtombs.c: New file. * wcsmbs/wmemrtowcs.c: New file.
Diffstat (limited to 'iconv/gconv_open.c')
-rw-r--r--iconv/gconv_open.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/iconv/gconv_open.c b/iconv/gconv_open.c
index 0e789df..343cb70 100644
--- a/iconv/gconv_open.c
+++ b/iconv/gconv_open.c
@@ -69,19 +69,19 @@ __gconv_open (const char *toset, const char *fromset, gconv_t *handle)
if (res != GCONV_OK)
break;
}
- else
- if (!data[cnt].is_last)
- {
- data[cnt].outbufsize = GCONV_DEFAULT_BUFSIZE;
- data[cnt].outbuf =
- (char *) malloc (data[cnt].outbufsize);
- if (data[cnt].outbuf == NULL)
- {
- res = GCONV_NOMEM;
- break;
- }
- data[cnt].outbufavail = 0;
- }
+
+ if (!data[cnt].is_last && data[cnt].outbuf == NULL)
+ {
+ data[cnt].outbufsize = GCONV_DEFAULT_BUFSIZE;
+ data[cnt].outbuf =
+ (char *) malloc (data[cnt].outbufsize);
+ if (data[cnt].outbuf == NULL)
+ {
+ res = GCONV_NOMEM;
+ break;
+ }
+ data[cnt].outbufavail = 0;
+ }
}
}
}