[HACKERS] Duplicate assignment in Unicode/convutils.pm

Поиск
Список
Период
Сортировка
Искать

[HACKERS] Duplicate assignment in Unicode/convutils.pm

От:
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Дата:
Hi, I found that convutils.pl contains a harmless duplicate
assignemnt.

>     my $out = {f => $fname, l => $.,
>                code => hex($1),
>                ucs => hex($2),
>                comment => $4,
>                direction => BOTH,
>                f => $fname,
>                l => $.
>             };

Of course this is utterly harmless but wrong.

The attached patch fixes this following other perl files around.
No similar mistake is not found there.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm
index 479bfe9..42b4ffa 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -47,12 +47,11 @@ sub read_source		if (!/^0x([0-9A-Fa-f]+)\s+0x([0-9A-Fa-f]+)\s+(#.*)$/)		{			print STDERR "READ ERROR at line $. in $fname: $_\n";			exit;		}
-		my $out = {f => $fname, l => $.,
-				   code => hex($1),
+		my $out = {code => hex($1),				   ucs => hex($2),				   comment => $4,				   direction => BOTH,				   f => $fname,				   l => $.

Re: [HACKERS] Duplicate assignment in Unicode/convutils.pm

От:
Heikki Linnakangas <hlinnaka@iki.fi>
Дата:
On 04/07/2017 09:32 AM, Kyotaro HORIGUCHI wrote:
> Hi, I found that convutils.pl contains a harmless duplicate
> assignemnt.
>
>>     my $out = {f => $fname, l => $.,
>>                code => hex($1),
>>                ucs => hex($2),
>>                comment => $4,
>>                direction => BOTH,
>>                f => $fname,
>>                l => $.
>>             };
>
> Of course this is utterly harmless but wrong.
>
> The attached patch fixes this following other perl files around.
> No similar mistake is not found there.

Committed, thanks!

- Heikki



FAQ