1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-22 22:03:39 +03:00

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 2012-11-30 03:17:49 +01:00
parent f726a65309
commit d22567fe23
4 changed files with 8 additions and 20 deletions

View File

@ -43,7 +43,7 @@ public:
policy(vm);
if(priority.empty()!=true)
if(!priority.empty())
{
sw.max = fabs(*max_element(
priority.begin(),

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" )
{

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 ----

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";