locking: Use bit shift for flag values not constant values.

So far it hasn't bitten us, but if the next value wasn't 4, then
the logic used to check flag bits would have issues.
This commit is contained in:
John Ferlan 2016-03-04 09:35:19 -05:00
parent 47b70b8793
commit 0e3e00a183
1 changed files with 2 additions and 2 deletions

View File

@ -23,8 +23,8 @@
# define __VIR_LOCK_DRIVER_LOCKD_H__
enum virLockSpaceProtocolAcquireResourceFlags {
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1,
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2,
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = (1 << 0),
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = (1 << 1),
};
#endif /* __VIR_LOCK_DRIVER_LOCKD_H__ */