Skip to content

Commit

Permalink
Updated tracehash.pl file to skip parsing of empty line from hash file
Browse files Browse the repository at this point in the history
To get rid of these prints -
Use of uninitialized value $l_str in concatenation

Change-Id: I475c2471e9fde60c7413734412ada0243c1f570d
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67590
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
  • Loading branch information
Raja Das authored and sgupta2m committed Oct 18, 2018
1 parent f4b6cc7 commit 470b106
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tools/trace/tracehash.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
# Contributors Listed Below - COPYRIGHT 2015,2016
# Contributors Listed Below - COPYRIGHT 2015,2018
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -649,6 +649,11 @@ ($)

while (defined $line) {
chop $line; # remove EOL
if(! $line)
{
$line = <FH>;
next;
}
if($version eq "1")
{
($l_hash, $l_file ,$l_str) = split(/\|\|/, $line);
Expand All @@ -672,7 +677,7 @@ ($)
}
if ($hashstr1 ne $hashstr2)
{
print "*** ERROR: HASH Collision! (a_f)\n",
print "*** assimilate_file: ERROR: HASH Collision! (a_f)\n",
" Two different strings have the same hash value ($l_hash)\n",
" String 1: $hash_strings_array{$l_hash}\n",
" String 2: $newstring\n";
Expand Down

0 comments on commit 470b106

Please sign in to comment.