From 430a437217cf87d48434d381a31f58e337dae946 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Fri, 30 Nov 2012 09:13:37 +0000 Subject: [PATCH] defined(@array) is deprecated git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14505 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/switch.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/switch.pm b/xCAT-server/lib/xcat/plugins/switch.pm index d0d29c124..1bac5deb8 100644 --- a/xCAT-server/lib/xcat/plugins/switch.pm +++ b/xCAT-server/lib/xcat/plugins/switch.pm @@ -60,7 +60,7 @@ sub preprocess_request { my $switchestab=xCAT::Table->new('switches',-create=>0); my @all_switches; my @tmp=$switchestab->getAllAttribs(('switch')); - if (defined(@tmp) && (@tmp > 0)) { + if (@tmp && (@tmp > 0)) { foreach(@tmp) { my @switches_tmp=noderange($_->{switch}); if (@switches_tmp==0) { push @switches_tmp, $_->{switch}; }