提交 2a372a5a 编写于 作者: B Bihong Yu 提交者: Michal Privoznik

Fix some wrong usage of ATTRIBUTE_NONNULL()

The virStateInitialize() function has ATTRIBUTE_NONNULL()
referring to @root argument (incorrectly anyway) but in
daemonRunStateInit() NULL is passed in anyway.

Then there is virCommandAddArgPair() which also has
ATTRIBUTE_NONNULL() for one of its arguments and then checks the
argument for being NULL anyways.
Signed-off-by: NBihong Yu <yubihong@huawei.com>
Reviewed-by: NChuan Zheng <zhengchuan@huawei.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 f225f37a
......@@ -33,8 +33,7 @@ int virStateInitialize(bool privileged,
bool mandatory,
const char *root,
virStateInhibitCallback inhibit,
void *opaque)
ATTRIBUTE_NONNULL(2);
void *opaque);
int virStateCleanup(void);
int virStateReload(void);
int virStateStop(void);
......
......@@ -126,8 +126,7 @@ void virCommandAddArgFormat(virCommandPtr cmd,
void virCommandAddArgPair(virCommandPtr cmd,
const char *name,
const char *val)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
const char *val);
void virCommandAddArgSet(virCommandPtr cmd,
const char *const*vals) ATTRIBUTE_NONNULL(2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册