bug-1669: Wrong condition checks in some files. Makes some string treatment case-senitive, as opposed

with the convenction in OpenNebula (strings are *not* case sensitive)
This commit is contained in:
Ruben S. Montero authored and Tino Vazquez committed 2012-12-21 11:14:01 +01:00
1 parent 4865ee9805
commit 6504ab7c46
4 files changed
+8 -20

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ public:
policy(vm);
if(priority.empty()!=true)
if(!priority.empty())
{
sw.max = fabs(*max_element(
priority.begin(),
+5 -11
View File
@@ -334,10 +334,7 @@ int LibVirtDriver::deployment_description_kvm(
// ---- Disk type and source for the image ----
if (type.empty() == false)
{
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
}
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
if ( type == "BLOCK" )
{
@@ -548,13 +545,10 @@ int LibVirtDriver::deployment_description_kvm(
passwd = graphics->vector_value("PASSWD");
keymap = graphics->vector_value("KEYMAP");
if (type.empty() != false)
{
transform(type.begin(),
type.end(),
type.begin(),
(int(*)(int))tolower);
}
transform(type.begin(),
type.end(),
type.begin(),
(int(*)(int))tolower);
if ( type == "vnc" || type == "spice" )
{
+1 -4
View File
@@ -214,10 +214,7 @@ int LibVirtDriver::deployment_description_vmware(
}
}
if (type.empty() == false)
{
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
}
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
// ---- Disk type and source for the image ----
+1 -4
View File
@@ -248,10 +248,7 @@ int XenDriver::deployment_description(
goto error_disk;
}
if (type.empty() == false)
{
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
}
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
mode = "w";