summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-03-27 17:07:28 +0200
committerThomas Haller <thaller@redhat.com>2017-03-28 14:58:21 +0200
commit1601d2caf6c2a3c7d5ba732875a9ecf152ff4b55 (patch)
tree0ababb148ab9c21f2daeea19780610e08b4ede87
parenta482fbe1b6ace34f98d17e8526a2daad5a497bcb (diff)
downloadNetworkManager-1601d2caf6c2a3c7d5ba732875a9ecf152ff4b55.tar.gz
libnm: document to allow omitting argument to get-options functions
These functions return static information, and don't require a @setting argument. The list of options is interesting even when having now setting instance at hand. Document this to promise the user that passing %NULL is allowed. It was allowed since when those functions were added.
-rw-r--r--libnm-core/nm-setting-bond.c4
-rw-r--r--libnm-core/nm-setting-wired.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c
index 904ebbfc6d..74523eddb7 100644
--- a/libnm-core/nm-setting-bond.c
+++ b/libnm-core/nm-setting-bond.c
@@ -395,10 +395,12 @@ nm_setting_bond_remove_option (NMSettingBond *setting,
/**
* nm_setting_bond_get_valid_options:
- * @setting: the #NMSettingBond
+ * @setting: (allow none): the #NMSettingBond
*
* Returns a list of valid bond options.
*
+ * The @setting argument is unused and may be passed as %NULL.
+ *
* Returns: (transfer none): a %NULL-terminated array of strings of valid bond options.
**/
const char **
diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c
index fcd8e8370e..28422e1c3a 100644
--- a/libnm-core/nm-setting-wired.c
+++ b/libnm-core/nm-setting-wired.c
@@ -565,10 +565,12 @@ nm_setting_wired_remove_s390_option (NMSettingWired *setting,
/**
* nm_setting_wired_get_valid_s390_options:
- * @setting: the #NMSettingWired
+ * @setting: (allow none): the #NMSettingWired
*
* Returns a list of valid s390 options.
*
+ * The @setting argument is unused and %NULL may be passed instead.
+ *
* Returns: (transfer none): a %NULL-terminated array of strings of valid s390 options.
**/
const char **