mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
Fix 1 << -1 in JOB_MASK macro
Calling JOB_MASK(QEMU_JOB_NONE) would result in 1 << -1. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
764d7d0915
commit
0248098d38
@ -30,7 +30,7 @@
|
|||||||
# include "libxl_conf.h"
|
# include "libxl_conf.h"
|
||||||
# include "virchrdev.h"
|
# include "virchrdev.h"
|
||||||
|
|
||||||
# define JOB_MASK(job) (1 << (job - 1))
|
# define JOB_MASK(job) (job == 0 ? 0 : 1 << (job - 1))
|
||||||
# define DEFAULT_JOB_MASK \
|
# define DEFAULT_JOB_MASK \
|
||||||
(JOB_MASK(LIBXL_JOB_DESTROY) | \
|
(JOB_MASK(LIBXL_JOB_DESTROY) | \
|
||||||
JOB_MASK(LIBXL_JOB_ABORT))
|
JOB_MASK(LIBXL_JOB_ABORT))
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
# define QEMU_DOMAIN_MIG_BANDWIDTH_MAX (INT64_MAX / (1024 * 1024))
|
# define QEMU_DOMAIN_MIG_BANDWIDTH_MAX (INT64_MAX / (1024 * 1024))
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# define JOB_MASK(job) (1 << (job - 1))
|
# define JOB_MASK(job) (job == 0 ? 0 : 1 << (job - 1))
|
||||||
# define QEMU_JOB_DEFAULT_MASK \
|
# define QEMU_JOB_DEFAULT_MASK \
|
||||||
(JOB_MASK(QEMU_JOB_QUERY) | \
|
(JOB_MASK(QEMU_JOB_QUERY) | \
|
||||||
JOB_MASK(QEMU_JOB_DESTROY) | \
|
JOB_MASK(QEMU_JOB_DESTROY) | \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user