mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix build after 47e5b5ae32
The patch described above introduced two problems caught by the compiler and thus breaking the build. One of the problems was comparison of unsigned with < 0 and the second one jumped a variable init.
This commit is contained in:
parent
1ce7c1d20c
commit
0e6cacc4b1
@ -337,6 +337,7 @@ virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
||||
virCgroupPtr cgroup)
|
||||
{
|
||||
int capMknod = def->caps_features[VIR_DOMAIN_CAPS_FEATURE_MKNOD];
|
||||
int ret = -1;
|
||||
size_t i;
|
||||
static virLXCCgroupDevicePolicy devices[] = {
|
||||
@ -354,7 +355,6 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
||||
goto cleanup;
|
||||
|
||||
/* white list mknod if CAP_MKNOD has to be kept */
|
||||
int capMknod = def->caps_features[VIR_DOMAIN_CAPS_FEATURE_MKNOD];
|
||||
if (capMknod == VIR_DOMAIN_FEATURE_STATE_ON) {
|
||||
if (virCgroupAllowAllDevices(cgroup,
|
||||
VIR_CGROUP_DEVICE_MKNOD) < 0)
|
||||
|
@ -1899,7 +1899,7 @@ static int lxcContainerDropCapabilities(virDomainDefPtr def,
|
||||
int policy = def->features[VIR_DOMAIN_FEATURE_CAPABILITIES];
|
||||
|
||||
/* Maps virDomainCapsFeature to CAPS_* */
|
||||
static unsigned int capsMapping[] = {CAP_AUDIT_CONTROL,
|
||||
static int capsMapping[] = {CAP_AUDIT_CONTROL,
|
||||
CAP_AUDIT_WRITE,
|
||||
CAP_BLOCK_SUSPEND,
|
||||
CAP_CHOWN,
|
||||
|
Loading…
Reference in New Issue
Block a user