mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 18:05:20 +00:00
esx_util.h: Add ESX_VI_CHECK_ARG_LIST macro
This macro avoids code duplication when checking for arrays of objects. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d6cfa0cde0
commit
03212ab925
@ -26,6 +26,14 @@
|
||||
# include "internal.h"
|
||||
# include "viruri.h"
|
||||
|
||||
# define ESX_VI_CHECK_ARG_LIST(val) \
|
||||
do { \
|
||||
if (!val || *val) { \
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument")); \
|
||||
return -1; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
typedef struct _esxUtil_ParsedUri esxUtil_ParsedUri;
|
||||
|
||||
struct _esxUtil_ParsedUri {
|
||||
|
Loading…
x
Reference in New Issue
Block a user