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)
(cherry picked from commit d22567fe23)
This commit is contained in:
Ruben S. Montero authored and Javi Fontan committed 2012-12-20 17:30:07 +01:00
1 parent 119ac7966a
commit 48b371dcda
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
@@ -331,10 +331,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" )
{
@@ -532,13 +529,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
@@ -211,10 +211,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
@@ -245,10 +245,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";