mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
vsh-table: Ensure NULL terminated arguments to vshTable*()
There are two functions that take variable arguments: vshTableNew() and vshTableRowAppend(). Both expect the list of arguments to be NULL terminated. Annotate them with G_GNUC_NULL_TERMINATED to enable compile time check for this. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -29,10 +29,12 @@ vshTableFree(vshTable *table);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(vshTable, vshTableFree);
|
||||
|
||||
vshTable *
|
||||
vshTableNew(const char *format, ...);
|
||||
vshTableNew(const char *format, ...)
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
|
||||
int
|
||||
vshTableRowAppend(vshTable *table, const char *arg, ...);
|
||||
vshTableRowAppend(vshTable *table, const char *arg, ...)
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
|
||||
void
|
||||
vshTablePrintToStdout(vshTable *table, vshControl *ctl);
|
||||
|
||||
Reference in New Issue
Block a user