提交 426f3961 编写于 作者: J Ján Tomko

use G_GNUC_NULL_TERMINATED instead of ATTRIBUTE_SENTINEL

Prefer G_GNUC_NULL_TERMINATED which was introduced in GLib 2.8.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 5d1c4a35
...@@ -1159,7 +1159,7 @@ qemuAgentCommand(qemuAgentPtr mon, ...@@ -1159,7 +1159,7 @@ qemuAgentCommand(qemuAgentPtr mon,
return ret; return ret;
} }
static virJSONValuePtr ATTRIBUTE_SENTINEL static virJSONValuePtr G_GNUC_NULL_TERMINATED
qemuAgentMakeCommand(const char *cmdname, qemuAgentMakeCommand(const char *cmdname,
...) ...)
{ {
......
...@@ -557,7 +557,7 @@ qemuMonitorJSONMakeCommandInternal(const char *cmdname, ...@@ -557,7 +557,7 @@ qemuMonitorJSONMakeCommandInternal(const char *cmdname,
} }
static virJSONValuePtr ATTRIBUTE_SENTINEL static virJSONValuePtr G_GNUC_NULL_TERMINATED
qemuMonitorJSONMakeCommand(const char *cmdname, qemuMonitorJSONMakeCommand(const char *cmdname,
...) ...)
{ {
......
...@@ -77,7 +77,7 @@ void virBufferAsprintf(virBufferPtr buf, const char *format, ...) ...@@ -77,7 +77,7 @@ void virBufferAsprintf(virBufferPtr buf, const char *format, ...)
void virBufferVasprintf(virBufferPtr buf, const char *format, va_list ap) void virBufferVasprintf(virBufferPtr buf, const char *format, va_list ap)
ATTRIBUTE_FMT_PRINTF(2, 0); ATTRIBUTE_FMT_PRINTF(2, 0);
void virBufferStrcat(virBufferPtr buf, ...) void virBufferStrcat(virBufferPtr buf, ...)
ATTRIBUTE_SENTINEL; G_GNUC_NULL_TERMINATED;
void virBufferStrcatVArgs(virBufferPtr buf, va_list ap); void virBufferStrcatVArgs(virBufferPtr buf, va_list ap);
void virBufferEscape(virBufferPtr buf, char escape, const char *toescape, void virBufferEscape(virBufferPtr buf, char escape, const char *toescape,
......
...@@ -42,7 +42,7 @@ virCommandPtr virCommandNew(const char *binary) ATTRIBUTE_NONNULL(1); ...@@ -42,7 +42,7 @@ virCommandPtr virCommandNew(const char *binary) ATTRIBUTE_NONNULL(1);
virCommandPtr virCommandNewArgs(const char *const*args) ATTRIBUTE_NONNULL(1); virCommandPtr virCommandNewArgs(const char *const*args) ATTRIBUTE_NONNULL(1);
virCommandPtr virCommandNewArgList(const char *binary, ...) virCommandPtr virCommandNewArgList(const char *binary, ...)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL; ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
virCommandPtr virCommandNewVAList(const char *binary, va_list list) virCommandPtr virCommandNewVAList(const char *binary, va_list list)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);
...@@ -137,7 +137,7 @@ void virCommandAddArgSet(virCommandPtr cmd, ...@@ -137,7 +137,7 @@ void virCommandAddArgSet(virCommandPtr cmd,
void virCommandAddArgList(virCommandPtr cmd, void virCommandAddArgList(virCommandPtr cmd,
... /* const char *arg, ..., NULL */) ... /* const char *arg, ..., NULL */)
ATTRIBUTE_SENTINEL; G_GNUC_NULL_TERMINATED;
void virCommandSetWorkingDirectory(virCommandPtr cmd, void virCommandSetWorkingDirectory(virCommandPtr cmd,
const char *pwd) ATTRIBUTE_NONNULL(2); const char *pwd) ATTRIBUTE_NONNULL(2);
......
...@@ -317,7 +317,7 @@ char *virFileFindMountPoint(const char *type); ...@@ -317,7 +317,7 @@ char *virFileFindMountPoint(const char *type);
/* NB: this should be combined with virFileBuildPath */ /* NB: this should be combined with virFileBuildPath */
#define virBuildPath(path, ...) \ #define virBuildPath(path, ...) \
virBuildPathInternal(path, __VA_ARGS__, NULL) virBuildPathInternal(path, __VA_ARGS__, NULL)
int virBuildPathInternal(char **path, ...) ATTRIBUTE_SENTINEL; int virBuildPathInternal(char **path, ...) G_GNUC_NULL_TERMINATED;
int virFilePrintf(FILE *fp, const char *msg, ...) int virFilePrintf(FILE *fp, const char *msg, ...)
ATTRIBUTE_FMT_PRINTF(2, 3); ATTRIBUTE_FMT_PRINTF(2, 3);
......
...@@ -65,7 +65,7 @@ virFirewallRulePtr virFirewallAddRuleFull(virFirewallPtr firewall, ...@@ -65,7 +65,7 @@ virFirewallRulePtr virFirewallAddRuleFull(virFirewallPtr firewall,
virFirewallQueryCallback cb, virFirewallQueryCallback cb,
void *opaque, void *opaque,
...) ...)
ATTRIBUTE_SENTINEL; G_GNUC_NULL_TERMINATED;
void virFirewallRemoveRule(virFirewallPtr firewall, void virFirewallRemoveRule(virFirewallPtr firewall,
virFirewallRulePtr rule); virFirewallRulePtr rule);
...@@ -88,7 +88,7 @@ void virFirewallRuleAddArgSet(virFirewallPtr firewall, ...@@ -88,7 +88,7 @@ void virFirewallRuleAddArgSet(virFirewallPtr firewall,
void virFirewallRuleAddArgList(virFirewallPtr firewall, void virFirewallRuleAddArgList(virFirewallPtr firewall,
virFirewallRulePtr rule, virFirewallRulePtr rule,
...) ...)
ATTRIBUTE_SENTINEL; G_GNUC_NULL_TERMINATED;
size_t virFirewallRuleGetArgCount(virFirewallRulePtr rule); size_t virFirewallRuleGetArgCount(virFirewallRulePtr rule);
......
...@@ -48,11 +48,11 @@ void virJSONValueHashFree(void *opaque, const void *name); ...@@ -48,11 +48,11 @@ void virJSONValueHashFree(void *opaque, const void *name);
virJSONType virJSONValueGetType(const virJSONValue *value); virJSONType virJSONValueGetType(const virJSONValue *value);
int virJSONValueObjectCreate(virJSONValuePtr *obj, ...) int virJSONValueObjectCreate(virJSONValuePtr *obj, ...)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL; ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
int virJSONValueObjectCreateVArgs(virJSONValuePtr *obj, va_list args) int virJSONValueObjectCreateVArgs(virJSONValuePtr *obj, va_list args)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);
int virJSONValueObjectAdd(virJSONValuePtr obj, ...) int virJSONValueObjectAdd(virJSONValuePtr obj, ...)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL; ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
int virJSONValueObjectAddVArgs(virJSONValuePtr obj, va_list args) int virJSONValueObjectAddVArgs(virJSONValuePtr obj, va_list args)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);
......
...@@ -62,7 +62,7 @@ struct _virTypedParameterRemote { ...@@ -62,7 +62,7 @@ struct _virTypedParameterRemote {
int virTypedParamsValidate(virTypedParameterPtr params, int nparams, int virTypedParamsValidate(virTypedParameterPtr params, int nparams,
/* const char *name, int type ... */ ...) /* const char *name, int type ... */ ...)
ATTRIBUTE_SENTINEL ATTRIBUTE_RETURN_CHECK; G_GNUC_NULL_TERMINATED ATTRIBUTE_RETURN_CHECK;
bool virTypedParamsCheck(virTypedParameterPtr params, bool virTypedParamsCheck(virTypedParameterPtr params,
int nparams, int nparams,
......
...@@ -122,7 +122,7 @@ void vzDomObjFree(void *p); ...@@ -122,7 +122,7 @@ void vzDomObjFree(void *p);
virDomainObjPtr vzDomObjFromDomain(virDomainPtr domain); virDomainObjPtr vzDomObjFromDomain(virDomainPtr domain);
char * vzGetOutput(const char *binary, ...) char * vzGetOutput(const char *binary, ...)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL; ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
vzDriverPtr vzDriverPtr
vzGetDriverConnection(void); vzGetDriverConnection(void);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
#if WITH_QEMU || WITH_BHYVE #if WITH_QEMU || WITH_BHYVE
static int ATTRIBUTE_SENTINEL static int G_GNUC_NULL_TERMINATED
fillStringValues(virDomainCapsStringValuesPtr values, ...) fillStringValues(virDomainCapsStringValuesPtr values, ...)
{ {
int ret = 0; int ret = 0;
......
...@@ -65,7 +65,7 @@ int qemuMonitorTestAddItemParams(qemuMonitorTestPtr test, ...@@ -65,7 +65,7 @@ int qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
const char *cmdname, const char *cmdname,
const char *response, const char *response,
...) ...)
ATTRIBUTE_SENTINEL; G_GNUC_NULL_TERMINATED;
int qemuMonitorTestAddItemExpect(qemuMonitorTestPtr test, int qemuMonitorTestAddItemExpect(qemuMonitorTestPtr test,
const char *cmdname, const char *cmdname,
......
...@@ -48,9 +48,9 @@ int virTestRun(const char *title, ...@@ -48,9 +48,9 @@ int virTestRun(const char *title,
const void *data); const void *data);
int virTestLoadFile(const char *file, char **buf); int virTestLoadFile(const char *file, char **buf);
char *virTestLoadFilePath(const char *p, ...) char *virTestLoadFilePath(const char *p, ...)
ATTRIBUTE_SENTINEL; G_GNUC_NULL_TERMINATED;
virJSONValuePtr virTestLoadFileJSON(const char *p, ...) virJSONValuePtr virTestLoadFileJSON(const char *p, ...)
ATTRIBUTE_SENTINEL; G_GNUC_NULL_TERMINATED;
int virTestCaptureProgramOutput(const char *const argv[], char **buf, int maxlen); int virTestCaptureProgramOutput(const char *const argv[], char **buf, int maxlen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册