diff options
author | Bruno Haible <bruno@clisp.org> | 2009-04-26 15:31:18 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-04-26 15:31:18 +0200 |
commit | 7723389f98b6159511dea9bd60bf41ec99f0ae14 (patch) | |
tree | 85c45c416585ebb55d87397625683a33497363b3 /lib/unicase/u-casexfrm.h | |
parent | a5bd4a560247e63db562041f9d136ba83a8b95fb (diff) | |
download | gnulib-7723389f98b6159511dea9bd60bf41ec99f0ae14.tar.gz |
Simplify calling convention of u*_conv_to_encoding.
Diffstat (limited to 'lib/unicase/u-casexfrm.h')
-rw-r--r-- | lib/unicase/u-casexfrm.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/unicase/u-casexfrm.h b/lib/unicase/u-casexfrm.h index a7298a9701..e36aff3b9e 100644 --- a/lib/unicase/u-casexfrm.h +++ b/lib/unicase/u-casexfrm.h @@ -26,7 +26,6 @@ FUNC (const UNIT *s, size_t n, const char *iso639_language, uninorm_t nf, char convsbuf[2048]; char *convs; size_t convs_length; - int ret; char *result; /* Casefold and normalize the Unicode string. */ @@ -37,14 +36,13 @@ FUNC (const UNIT *s, size_t n, const char *iso639_language, uninorm_t nf, return NULL; /* Convert it to locale encoding. */ - convs = convsbuf; convs_length = sizeof (convsbuf) - 1; - ret = U_CONV_TO_ENCODING (locale_charset (), - iconveh_error, - foldeds, foldeds_length, - NULL, - &convs, &convs_length); - if (ret < 0) + convs = U_CONV_TO_ENCODING (locale_charset (), + iconveh_error, + foldeds, foldeds_length, + NULL, + convsbuf, &convs_length); + if (convs == NULL) { if (foldeds != foldedsbuf) { |