mirror of https://gitee.com/openkylin/libvirt.git
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:Bihong Yu <yubihong@huawei.com> Reviewed-by:Chuan Zheng <zhengchuan@huawei.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f225f37a8a
commit
2a372a5ad5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue