summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-05-19 10:15:32 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-05-19 10:15:32 +0000
commit4dfcf03139f1961778dd80c98eadc8b72200b179 (patch)
treeb9af1bf62b3d4c1f59000ac58e532a9efe2c5768
parent25f81b434f970ca9297cc5b79d6b0a3423921529 (diff)
Fixed htscharset
-rw-r--r--src/htscharset.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/htscharset.c b/src/htscharset.c
index 48afe47..41c99bb 100644
--- a/src/htscharset.c
+++ b/src/htscharset.c
@@ -618,7 +618,7 @@ char *hts_convertStringUTF8ToIDNA(const char *s, size_t size) {
#undef ADD_BYTE
#undef INCREASE_CAPA
#define INCREASE_CAPA() do { \
- capa = capa < 16 ? 16 : capa << 1; \
+ capa = capa < 16 ? 16 : ( capa << 1 ); \
dest = realloc(dest, capa); \
if (dest == NULL) { \
return NULL; \
@@ -631,7 +631,7 @@ char *hts_convertStringUTF8ToIDNA(const char *s, size_t size) {
dest[destSize++] = (char) (C); \
} while(0)
- for(i = startSeg = 0, nonAsciiFound = FALSE ; i <= size ; i++) {
+ for(i = startSeg = 0, nonAsciiFound = 0 ; i <= size ; i++) {
const unsigned char c = i < size ? (unsigned char) s[i] : 0;
/* separator (ending, url segment, scheme, path segment, query string) */
if (c == 0 || c == '.' || c == ':' || c == '/' || c == '?') {
@@ -665,7 +665,6 @@ char *hts_convertStringUTF8ToIDNA(const char *s, size_t size) {
if (utfSeq != (size_t) -1) {
/* unicode character */
punycode_uint uc = 0;
- size_t step = 0;
/* utf-8 sequence macro */
#define SEQ_MATCH(FROM, TO) \