From 34ac6419a4ff50891b6aca0ea6cff74ed68464f1 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 16 Nov 2010 08:03:24 +0000 Subject: [PATCH] fixed bug 3109407, use if(@TableRowArray) to replace if(defined(@TableRowArray)) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8167 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPmac.pm | 2 +- perl-xCAT/xCAT/PPCcli.pm | 2 +- perl-xCAT/xCAT/PPCmac.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/FSPmac.pm b/perl-xCAT/xCAT/FSPmac.pm index 1dc3c49ea..e4abe6920 100644 --- a/perl-xCAT/xCAT/FSPmac.pm +++ b/perl-xCAT/xCAT/FSPmac.pm @@ -84,7 +84,7 @@ sub do_getmacs { my $table = "nodetype"; my $intable = 0; my @TableRowArray = xCAT::DBobjUtils->getDBtable($table); - if ( defined(@TableRowArray) ) { + if ( @TableRowArray ) { foreach ( @TableRowArray ) { my @nodelist = split(',', $_->{'node'}); my @oslist = split(',', $_->{'os'}); diff --git a/perl-xCAT/xCAT/PPCcli.pm b/perl-xCAT/xCAT/PPCcli.pm index abafaaa4f..82ee79b9d 100644 --- a/perl-xCAT/xCAT/PPCcli.pm +++ b/perl-xCAT/xCAT/PPCcli.pm @@ -758,7 +758,7 @@ sub lpar_netboot { my $table = "nodetype"; my $intable = 0; my @TableRowArray = xCAT::DBobjUtils->getDBtable($table); - if ( defined(@TableRowArray) ) { + if ( @TableRowArray ) { foreach ( @TableRowArray ) { my @nodelist = split(',', $_->{'node'}); my @oslist = split(',', $_->{'os'}); diff --git a/perl-xCAT/xCAT/PPCmac.pm b/perl-xCAT/xCAT/PPCmac.pm index 06fc1bbf5..485330626 100644 --- a/perl-xCAT/xCAT/PPCmac.pm +++ b/perl-xCAT/xCAT/PPCmac.pm @@ -297,7 +297,7 @@ sub do_getmacs { my $table = "nodetype"; my $intable = 0; my @TableRowArray = xCAT::DBobjUtils->getDBtable($table); - if ( defined(@TableRowArray) ) { + if ( @TableRowArray ) { foreach ( @TableRowArray ) { my @nodelist = split(',', $_->{'node'}); my @oslist = split(',', $_->{'os'});