2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

The version of perl included with Ubuntu's Feisty release is generating

extra perl warnings about using an uninitialized value in a pattern
match when the user uses the arrow keys to move up and down in the option
list when asking how to handle path access rules.  This makes sure the
variables used in m// operations are always defined.
This commit is contained in:
Jesse Michael
2007-03-30 16:04:04 +00:00
parent b73d827660
commit 3d84f865c9

View File

@@ -3273,11 +3273,6 @@ sub Text_PromptUser ($) {
# get their input...
$ans = lc(getkey);
if ($ans && $keys{$ans} && $keys{$ans} eq "CMD_HELP") {
print "\n$helptext\n";
$ans = undef;
}
# pick the default if they hit return...
$ans = $default_key if ord($ans) == 10;
@@ -3317,7 +3312,12 @@ sub Text_PromptUser ($) {
if ($ans > 0 && $ans <= scalar(@$options)) {
$selected = $ans - 1;
}
$ans = undef;
$ans = "again";
}
if ($keys{$ans} && $keys{$ans} eq "CMD_HELP") {
print "\n$helptext\n";
$ans = "again";
}
}