提交 fbc72a1d 编写于 作者: P Peter Krempa

error: Fix typos in argument checking macros

Macro virCheckNullArgGoto is supposed to check for NULL argument but
checks non-NULL instead.

Macro virCheckNonNullArgReturn reports error as if the argument should
be NULL when it shouldn't.
上级 4b227307
...@@ -242,13 +242,13 @@ ...@@ -242,13 +242,13 @@
# define virCheckNonNullArgReturn(argname, retval) \ # define virCheckNonNullArgReturn(argname, retval) \
do { \ do { \
if (argname == NULL) { \ if (argname == NULL) { \
virReportInvalidNullArg(argname); \ virReportInvalidNonNullArg(argname); \
return retval; \ return retval; \
} \ } \
} while (0) } while (0)
# define virCheckNullArgGoto(argname, label) \ # define virCheckNullArgGoto(argname, label) \
do { \ do { \
if (argname == NULL) { \ if (argname != NULL) { \
virReportInvalidNullArg(argname); \ virReportInvalidNullArg(argname); \
goto label; \ goto label; \
} \ } \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册