1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

use G_GNUC_NULL_TERMINATED instead of ATTRIBUTE_SENTINEL

Prefer G_GNUC_NULL_TERMINATED which was introduced in GLib 2.8.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2019-10-14 14:13:31 +02:00
parent 5d1c4a35ec
commit 426f396198
12 changed files with 16 additions and 16 deletions

View File

@ -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,
...) ...)
{ {

View File

@ -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,
...) ...)
{ {

View File

@ -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,

View File

@ -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,
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);

View File

@ -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);

View File

@ -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,
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);

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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;

View File

@ -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,

View File

@ -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);