[PATCH 04/35] use G_GNUC_NULL_TERMINATED instead of ATTRIBUTE_SENTINEL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Prefer G_GNUC_NULL_TERMINATED which was introduced in GLib 2.8.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/qemu/qemu_agent.c        | 2 +-
 src/qemu/qemu_monitor_json.c | 2 +-
 src/util/virbuffer.h         | 2 +-
 src/util/vircommand.h        | 4 ++--
 src/util/virfile.h           | 2 +-
 src/util/virfirewall.h       | 4 ++--
 src/util/virjson.h           | 4 ++--
 src/util/virtypedparam.h     | 2 +-
 src/vz/vz_utils.h            | 2 +-
 tests/domaincapstest.c       | 2 +-
 tests/qemumonitortestutils.h | 2 +-
 tests/testutils.h            | 4 ++--
 12 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 0ef8b563f5..62edb665a7 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -1159,7 +1159,7 @@ qemuAgentCommand(qemuAgentPtr mon,
     return ret;
 }
 
-static virJSONValuePtr ATTRIBUTE_SENTINEL
+static virJSONValuePtr G_GNUC_NULL_TERMINATED
 qemuAgentMakeCommand(const char *cmdname,
                      ...)
 {
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index dbc32acb5e..6818e726c6 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -557,7 +557,7 @@ qemuMonitorJSONMakeCommandInternal(const char *cmdname,
 }
 
 
-static virJSONValuePtr ATTRIBUTE_SENTINEL
+static virJSONValuePtr G_GNUC_NULL_TERMINATED
 qemuMonitorJSONMakeCommand(const char *cmdname,
                            ...)
 {
diff --git a/src/util/virbuffer.h b/src/util/virbuffer.h
index d5a7a8dc33..75e26c32ff 100644
--- a/src/util/virbuffer.h
+++ b/src/util/virbuffer.h
@@ -77,7 +77,7 @@ void virBufferAsprintf(virBufferPtr buf, const char *format, ...)
 void virBufferVasprintf(virBufferPtr buf, const char *format, va_list ap)
   ATTRIBUTE_FMT_PRINTF(2, 0);
 void virBufferStrcat(virBufferPtr buf, ...)
-  ATTRIBUTE_SENTINEL;
+  G_GNUC_NULL_TERMINATED;
 void virBufferStrcatVArgs(virBufferPtr buf, va_list ap);
 
 void virBufferEscape(virBufferPtr buf, char escape, const char *toescape,
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index 1a7158d4c1..632d02bc71 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -42,7 +42,7 @@ virCommandPtr virCommandNew(const char *binary) ATTRIBUTE_NONNULL(1);
 virCommandPtr virCommandNewArgs(const char *const*args) ATTRIBUTE_NONNULL(1);
 
 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)
     ATTRIBUTE_NONNULL(1);
@@ -137,7 +137,7 @@ void virCommandAddArgSet(virCommandPtr cmd,
 
 void virCommandAddArgList(virCommandPtr cmd,
                           ... /* const char *arg, ..., NULL */)
-    ATTRIBUTE_SENTINEL;
+    G_GNUC_NULL_TERMINATED;
 
 void virCommandSetWorkingDirectory(virCommandPtr cmd,
                                    const char *pwd) ATTRIBUTE_NONNULL(2);
diff --git a/src/util/virfile.h b/src/util/virfile.h
index 2b037b00aa..f22380550c 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -317,7 +317,7 @@ char *virFileFindMountPoint(const char *type);
 /* NB: this should be combined with virFileBuildPath */
 #define virBuildPath(path, ...) \
     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, ...)
     ATTRIBUTE_FMT_PRINTF(2, 3);
diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h
index ff4626975b..a2c0e9c26d 100644
--- a/src/util/virfirewall.h
+++ b/src/util/virfirewall.h
@@ -65,7 +65,7 @@ virFirewallRulePtr virFirewallAddRuleFull(virFirewallPtr firewall,
                                           virFirewallQueryCallback cb,
                                           void *opaque,
                                           ...)
-    ATTRIBUTE_SENTINEL;
+    G_GNUC_NULL_TERMINATED;
 
 void virFirewallRemoveRule(virFirewallPtr firewall,
                            virFirewallRulePtr rule);
@@ -88,7 +88,7 @@ void virFirewallRuleAddArgSet(virFirewallPtr firewall,
 void virFirewallRuleAddArgList(virFirewallPtr firewall,
                                virFirewallRulePtr rule,
                                ...)
-    ATTRIBUTE_SENTINEL;
+    G_GNUC_NULL_TERMINATED;
 
 size_t virFirewallRuleGetArgCount(virFirewallRulePtr rule);
 
diff --git a/src/util/virjson.h b/src/util/virjson.h
index a5f959595f..65b8d5620a 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -48,11 +48,11 @@ void virJSONValueHashFree(void *opaque, const void *name);
 virJSONType virJSONValueGetType(const virJSONValue *value);
 
 int virJSONValueObjectCreate(virJSONValuePtr *obj, ...)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
+    ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
 int virJSONValueObjectCreateVArgs(virJSONValuePtr *obj, va_list args)
     ATTRIBUTE_NONNULL(1);
 int virJSONValueObjectAdd(virJSONValuePtr obj, ...)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
+    ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
 int virJSONValueObjectAddVArgs(virJSONValuePtr obj, va_list args)
     ATTRIBUTE_NONNULL(1);
 
diff --git a/src/util/virtypedparam.h b/src/util/virtypedparam.h
index 34cff1b2b3..2c998978ea 100644
--- a/src/util/virtypedparam.h
+++ b/src/util/virtypedparam.h
@@ -62,7 +62,7 @@ struct _virTypedParameterRemote {
 
 int virTypedParamsValidate(virTypedParameterPtr params, int nparams,
                            /* const char *name, int type ... */ ...)
-    ATTRIBUTE_SENTINEL ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_NULL_TERMINATED ATTRIBUTE_RETURN_CHECK;
 
 bool virTypedParamsCheck(virTypedParameterPtr params,
                          int nparams,
diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h
index f116f9dd1f..7ebb34bb11 100644
--- a/src/vz/vz_utils.h
+++ b/src/vz/vz_utils.h
@@ -122,7 +122,7 @@ void vzDomObjFree(void *p);
 virDomainObjPtr vzDomObjFromDomain(virDomainPtr domain);
 
 char * vzGetOutput(const char *binary, ...)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
+    ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
 
 vzDriverPtr
 vzGetDriverConnection(void);
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index b6961a986b..db14114cba 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -27,7 +27,7 @@
 #define VIR_FROM_THIS VIR_FROM_NONE
 
 #if WITH_QEMU || WITH_BHYVE
-static int ATTRIBUTE_SENTINEL
+static int G_GNUC_NULL_TERMINATED
 fillStringValues(virDomainCapsStringValuesPtr values, ...)
 {
     int ret = 0;
diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h
index 75ea63382d..2333fceed0 100644
--- a/tests/qemumonitortestutils.h
+++ b/tests/qemumonitortestutils.h
@@ -65,7 +65,7 @@ int qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
                                  const char *cmdname,
                                  const char *response,
                                  ...)
-    ATTRIBUTE_SENTINEL;
+    G_GNUC_NULL_TERMINATED;
 
 int qemuMonitorTestAddItemExpect(qemuMonitorTestPtr test,
                                  const char *cmdname,
diff --git a/tests/testutils.h b/tests/testutils.h
index 85ba9fbc0b..9099a77664 100644
--- a/tests/testutils.h
+++ b/tests/testutils.h
@@ -48,9 +48,9 @@ int virTestRun(const char *title,
                const void *data);
 int virTestLoadFile(const char *file, char **buf);
 char *virTestLoadFilePath(const char *p, ...)
-    ATTRIBUTE_SENTINEL;
+    G_GNUC_NULL_TERMINATED;
 virJSONValuePtr virTestLoadFileJSON(const char *p, ...)
-    ATTRIBUTE_SENTINEL;
+    G_GNUC_NULL_TERMINATED;
 
 int virTestCaptureProgramOutput(const char *const argv[], char **buf, int maxlen);
 
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux