From f9c0de1b5245b7cb84e74cbda19414874305aa5d Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 20 Dec 2010 10:03:58 +0000 Subject: [PATCH] defect 3111514: fixed some minor syntax problems git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8480 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/networks.pm | 2 +- xCAT-server/lib/xcat/plugins/route.pm | 2 +- xCAT-server/lib/xcat/plugins/xcat2nim.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/networks.pm b/xCAT-server/lib/xcat/plugins/networks.pm index 132cbb045..f69401df1 100644 --- a/xCAT-server/lib/xcat/plugins/networks.pm +++ b/xCAT-server/lib/xcat/plugins/networks.pm @@ -150,7 +150,7 @@ sub donets } %nethash = xCAT::DBobjUtils->getobjdefs(\%objtype, $callback); - if (!defined(%nethash)) { + if (!%nethash) { my $rsp; $rsp->{data}->[0] = "Could not get xCAT network definitions.\n"; xCAT::MsgUtils->message("E", $rsp, $::callback); diff --git a/xCAT-server/lib/xcat/plugins/route.pm b/xCAT-server/lib/xcat/plugins/route.pm index fd9d33e5b..76944ee59 100644 --- a/xCAT-server/lib/xcat/plugins/route.pm +++ b/xCAT-server/lib/xcat/plugins/route.pm @@ -180,7 +180,7 @@ sub process_makeroutes { my $routestab=xCAT::Table->new("routes", -create =>1); if ($routestab) { my @tmp1=$routestab->getAllAttribs(('routename', 'net', 'mask', 'gateway', 'ifname')); - if (defined(@tmp1) && (@tmp1 > 0)) { + if (@tmp1 > 0) { foreach(@tmp1) { $all_routes{$_->{routename}} = $_; $_->{process} = 0; diff --git a/xCAT-server/lib/xcat/plugins/xcat2nim.pm b/xCAT-server/lib/xcat/plugins/xcat2nim.pm index 0d365e130..4638ced1b 100644 --- a/xCAT-server/lib/xcat/plugins/xcat2nim.pm +++ b/xCAT-server/lib/xcat/plugins/xcat2nim.pm @@ -691,7 +691,7 @@ sub x2n # get all the attrs for these definitions %::objhash = xCAT::DBobjUtils->getobjdefs(\%::objtype); - if (!defined(%::objhash)) + if (!%::objhash) { my $rsp; $rsp->{data}->[0] = "Could not get xCAT object definitions.\n";