mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-17 18:33:32 +09: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:
1 parent
4865ee9805
commit
6504ab7c46
4 files changed
+8
-20
No files matched your search
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
policy(vm);
|
||||
|
||||
if(priority.empty()!=true)
|
||||
if(!priority.empty())
|
||||
{
|
||||
sw.max = fabs(*max_element(
|
||||
priority.begin(),
|
||||
|
||||
@@ -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" )
|
||||
{
|
||||
|
||||
@@ -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 ----
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in new issue
Block a user