diff options
author | Brian Horton <brianh@linux.ibm.com> | 2012-04-19 14:16:35 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-04-20 11:55:37 -0500 |
commit | 990e50add4572619d663a1c850dd47ad274c129f (patch) | |
tree | d5544d4df5e10072a2236d5732eefb668c7b8116 | |
parent | 065cd0b989d1395b1b462d6a2031a6ff130f9a6d (diff) | |
download | talos-hostboot-990e50add4572619d663a1c850dd47ad274c129f.tar.gz talos-hostboot-990e50add4572619d663a1c850dd47ad274c129f.zip |
correct 'duplicate checking' in scanforsrcs.pl script
The hash was being set and checked incorrectly in the script, looking
for duplicate module id / reason code tags. Previous code would only
find duplicates if they were consecutive in the code. Fixed code
correctly finds duplicates even if they are in different files.
Change-Id: I80de8a7071c298533c3f6cb1777aa074020afa62
Depends-on: Ib0717d6ea916fbc330cadd5dce420cc80694eaf0
RTC: 38731
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/918
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rwxr-xr-x | src/usr/errl/parser/scanforsrcs.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/errl/parser/scanforsrcs.pl b/src/usr/errl/parser/scanforsrcs.pl index 4f6cb73da..ebed31b65 100755 --- a/src/usr/errl/parser/scanforsrcs.pl +++ b/src/usr/errl/parser/scanforsrcs.pl @@ -680,7 +680,7 @@ sub writePrintStatement # If we've got a duplicate Module Id/Reason code go, on to the # next one. We can't have duplicates, so if we do we set found_dup # so that we can die after this loop - if( "$modId.$reasonCode" eq $caseHash{ $compName } ) + if( exists $caseHash{ $modId.$reasonCode } ) { debugMsg( "Hash exists, skip subsequent." ); @@ -696,7 +696,7 @@ sub writePrintStatement } else { - $caseHash{ $compName } = "$modId.$reasonCode"; + $caseHash{ $modId.$reasonCode } = 1; } |