提交 03212ab9 编写于 作者: M Marcos Paulo de Souza 提交者: Michal Privoznik

esx_util.h: Add ESX_VI_CHECK_ARG_LIST macro

This macro avoids code duplication when checking for arrays of objects.
Signed-off-by: NMarcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 d6cfa0cd
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册