* [PATCH] Fix invalid variable shadowing
@ 2011-05-27 9:57 Andreas Schwab
2011-05-27 10:31 ` [PATCH] Fix conversion to ISO-2022-JP-2 with ISO-8859-7 designation Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2011-05-27 9:57 UTC (permalink / raw)
To: libc-hacker
2011-05-27 Andreas Schwab <schwab@redhat.com>
[BZ #12814]
* iconvdata/iso-2022-jp.c (BODY): Fix invalid variable shadowing.
---
iconvdata/iso-2022-jp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/iconvdata/iso-2022-jp.c b/iconvdata/iso-2022-jp.c
index e14b796..5580c44 100644
--- a/iconvdata/iso-2022-jp.c
+++ b/iconvdata/iso-2022-jp.c
@@ -764,9 +764,9 @@ static const cvlist_t conversion_lists[4] =
++rp; \
if (ch >= rp->start) \
{ \
- unsigned char res = \
+ unsigned char ch2 = \
iso88597_from_ucs4[ch - 0xa0 + rp->idx]; \
- if (res != '\0') \
+ if (ch2 != '\0') \
{ \
if (set2 != ISO88597_set) \
{ \
@@ -789,7 +789,7 @@ static const cvlist_t conversion_lists[4] =
} \
*outptr++ = ESC; \
*outptr++ = 'N'; \
- *outptr++ = res; \
+ *outptr++ = ch2; \
res = __GCONV_OK; \
break; \
} \
--
1.7.4.4
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Fix conversion to ISO-2022-JP-2 with ISO-8859-7 designation
2011-05-27 9:57 [PATCH] Fix invalid variable shadowing Andreas Schwab
@ 2011-05-27 10:31 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2011-05-27 10:31 UTC (permalink / raw)
To: libc-hacker
2011-05-27 Andreas Schwab <schwab@redhat.com>
[BZ #12814]
* iconvdata/iso-2022-jp.c (BODY for TO_LOOP): Fix invalid variable
shadowing. Strip upper bit when using 8859-7 designation.
---
iconvdata/iso-2022-jp.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/iconvdata/iso-2022-jp.c b/iconvdata/iso-2022-jp.c
index e14b796..05ddb28 100644
--- a/iconvdata/iso-2022-jp.c
+++ b/iconvdata/iso-2022-jp.c
@@ -664,7 +664,7 @@ static const cvlist_t conversion_lists[4] =
\
*outptr++ = ESC; \
*outptr++ = 'N'; \
- *outptr++ = res; \
+ *outptr++ = res & 0x7f; \
written = 3; \
} \
} \
@@ -764,9 +764,9 @@ static const cvlist_t conversion_lists[4] =
++rp; \
if (ch >= rp->start) \
{ \
- unsigned char res = \
+ unsigned char ch2 = \
iso88597_from_ucs4[ch - 0xa0 + rp->idx]; \
- if (res != '\0') \
+ if (ch2 != '\0') \
{ \
if (set2 != ISO88597_set) \
{ \
@@ -789,7 +789,7 @@ static const cvlist_t conversion_lists[4] =
} \
*outptr++ = ESC; \
*outptr++ = 'N'; \
- *outptr++ = res; \
+ *outptr++ = ch2 - 0x80; \
res = __GCONV_OK; \
break; \
} \
--
1.7.4.4
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-27 10:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 9:57 [PATCH] Fix invalid variable shadowing Andreas Schwab
2011-05-27 10:31 ` [PATCH] Fix conversion to ISO-2022-JP-2 with ISO-8859-7 designation Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).