summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@kernel.org>2022-04-14 14:24:59 +0200
committerPetri Latvala <petri.latvala@intel.com>2022-04-14 18:19:39 +0300
commite96b67a069da8ab2a2b884a0ca0446d6cf4fe945 (patch)
tree37818ddee5a8b88b1b527e89a4463cf9d3969d74 /scripts
parent3b73a372a3b21192b9fec51352c5019675834b26 (diff)
code_cov_parse_info: fix error handling when opening files
While on bash scripts we use "||" for error handling, perl accepts it, but it has a higher priority, thus would require to use parenthesis before that. That causes it to print a warning when the open fail while reading filter files, instead of the original intent of finishing and reporting an error. So, let's use "or" instead. Reviewed-by: Ch Sai Gowtham <sai.gowtham.ch@intel.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/code_cov_parse_info4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/code_cov_parse_info b/scripts/code_cov_parse_info
index 3e1525a6..c8284a29 100755
--- a/scripts/code_cov_parse_info
+++ b/scripts/code_cov_parse_info
@@ -513,7 +513,7 @@ my $filter_str = "";
my $has_filter;
if ($func_filters) {
- open IN, $func_filters || die "Can't open $func_filters";
+ open IN, $func_filters or die "Can't open $func_filters";
while (<IN>) {
s/^\s+//;
s/\s+$//;
@@ -524,7 +524,7 @@ if ($func_filters) {
}
if ($src_filters) {
- open IN, $src_filters || die "Can't open $src_filters";
+ open IN, $src_filters or die "Can't open $src_filters";
while (<IN>) {
s/^\s+//;
s/\s+$//;