mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-13 00:46:03 -06:00
Ensure remote daemon unions are always non-zero length
If the remote daemon args/ret unions ever become zero length (due to a build / Makefile bug) then bad stuff happens at runtime. Add a compile time assertion to check for this kind of problem * daemon/remote.h: Ensure non-zero length unions
This commit is contained in:
parent
48ab20999f
commit
7bdb05ea7c
@ -30,18 +30,22 @@
|
||||
typedef union {
|
||||
# include "remote_dispatch_args.h"
|
||||
} dispatch_args;
|
||||
verify(sizeof(dispatch_args) > 0);
|
||||
|
||||
typedef union {
|
||||
# include "remote_dispatch_ret.h"
|
||||
} dispatch_ret;
|
||||
verify(sizeof(dispatch_ret) > 0);
|
||||
|
||||
typedef union {
|
||||
# include "qemu_dispatch_args.h"
|
||||
} qemu_dispatch_args;
|
||||
verify(sizeof(qemu_dispatch_args) > 0);
|
||||
|
||||
typedef union {
|
||||
# include "qemu_dispatch_ret.h"
|
||||
} qemu_dispatch_ret;
|
||||
verify(sizeof(qemu_dispatch_ret) > 0);
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user