History

kconfig: streamline_config.pl: check defined(ENV variable) before using it

A user reported: 'Use of uninitialized value $ENV{"LMC_KEEP"} in split at ./scripts/kconfig/streamline_config.pl line 596.' so first check that $ENV{LMC_KEEP} is defined before trying to use it.

Randy Dunlap committed 6 years ago

Commit a73fbfc1 parent 91a9d501 file · +4 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kconfig/streamline_config.pl+4−1
@@ -593,7 +593,10 @@ while ($repeat) { · 592 unmodified lines
593593 }
594594
595595 my %setconfigs;
596−my @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP});
596+my @preserved_kconfigs;
597+if (defined($ENV{'LMC_KEEP'})) {
598+ @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP});
599+}
597600
598601 sub in_preserved_kconfigs {
599602 my $kconfig = $config2kfile{$_[0]};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t