From 487b70b1d6a7e90d23ea7b7bb58e3185e9803a9b Mon Sep 17 00:00:00 2001 From: nott Date: Fri, 22 Aug 2008 14:07:55 +0000 Subject: [PATCH] Misc. code cleanup. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2052 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 4272b3246..825833df8 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -651,7 +651,7 @@ sub processArgs } # must have object name(s) - - if (!@::clobjnames && !@::fileobjnames) + if ((scalar(@::clobjnames) == 0) && (scalar(@::fileobjnames) == 0)) { my $rsp; $rsp->{data}->[0] = @@ -662,13 +662,13 @@ sub processArgs # combine object name all object names provided @::allobjnames = @::clobjnames; - if (@::fileobjnames) + if (scalar(@::fileobjnames) > 0) { # add list from stanza or xml file push @::allobjnames, @::fileobjnames; } - elsif (@::objfilelist) + elsif (scalar(@::objfilelist) > 0) { # add list from "-f" file option @@ -2205,7 +2205,7 @@ sub defls next; } - if (!grep(/$obj/, @tmplist)) + if (!grep(/^$obj$/, @tmplist)) { my $rsp; $rsp->{data}->[0] =