From e70ed0f3f0951b4474a3ffb5d9b2a97b869432ac Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 25 Jan 2018 09:17:41 -0500 Subject: [PATCH] Handle some warning messages based on this code - isn't numeric in numeric ne (!=) - Scalar value @attr_value[-1] better written as $attr_value[-1] --- xCAT-server/lib/xcat/plugins/openbmc.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 87a979061..66ef88298 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1171,7 +1171,7 @@ sub parse_args { my $all_subcommand = ""; foreach $subcommand (@ARGV) { $::RSPCONFIG_CONFIGURED_API_KEY = &is_valid_config_api($subcommand, $callback); - if ($::RSPCONFIG_CONFIGURED_API_KEY != -1) { + if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { # subcommand defined in the configured API hash, return from here, the RSPCONFIG_CONFIGURED_API_KEY is the key into the hash return; } @@ -1574,7 +1574,7 @@ sub parse_command_status { my @options = (); my $num_subcommand = @$subcommands; #Setup chain to process the configured command - if ($::RSPCONFIG_CONFIGURED_API_KEY != -1) { + if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { $subcommand = $$subcommands[0]; # Check if setting or quering if ($subcommand =~ /^(\w+)=(.*)/) { @@ -3609,7 +3609,7 @@ sub rspconfig_api_config_response { # For example "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.Restore" # will be displayed as "Restore" my @attr_value = split('\.', $value); - my $last_component = @attr_value[-1]; + my $last_component = $attr_value[-1]; my @valid_values = values $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}; if ($value) { if ($value ~~ @valid_values) {