summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-03-02 11:59:17 +0100
committerThomas Haller <thaller@redhat.com>2023-03-29 11:46:48 +0200
commit6043910bffc3428d0f0262fc3416b75766dd23f4 (patch)
tree16e069e80dd27d66e406c2b999963670293c582d
parent98dd4180ec163af63fe1e0fda00158ac7f0047df (diff)
downloadNetworkManager-6043910bffc3428d0f0262fc3416b75766dd23f4.tar.gz
doc: use "Returns:" annotation instead of deprecated aliases
-rw-r--r--src/core/devices/nm-device.c2
-rw-r--r--src/libnm-client-impl/nm-client.c8
-rw-r--r--src/libnm-core-impl/nm-utils.c24
-rw-r--r--src/libnm-glib-aux/nm-dedup-multi.c2
-rw-r--r--src/libnm-glib-aux/nm-shared-utils.c4
-rw-r--r--src/libnm-glib-aux/nm-shared-utils.h2
-rw-r--r--src/libnmt-newt/nmt-newt-widget.c2
-rw-r--r--src/nmcli/connections.c2
8 files changed, 23 insertions, 23 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index bab91dbea3..c150cbf6ba 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -13000,7 +13000,7 @@ reapply_connection(NMDevice *self, NMConnection *con_old, NMConnection *con_new)
* Change configuration of an already configured device if possible.
* Updates the device's applied connection upon success.
*
- * Return: %FALSE if the new configuration can not be reapplied.
+ * Returns: %FALSE if the new configuration can not be reapplied.
*/
static gboolean
check_and_reapply_connection(NMDevice *self,
diff --git a/src/libnm-client-impl/nm-client.c b/src/libnm-client-impl/nm-client.c
index bdf556f12e..2bb220fafb 100644
--- a/src/libnm-client-impl/nm-client.c
+++ b/src/libnm-client-impl/nm-client.c
@@ -6052,7 +6052,7 @@ nm_client_load_connections_finish(NMClient *client,
* files from disk, adding, updating, and removing connections until
* the in-memory state matches the on-disk state.
*
- * Return value: %TRUE on success, %FALSE on failure
+ * Returns: %TRUE on success, %FALSE on failure
*
* Deprecated: 1.22: Use nm_client_reload_connections_async() or GDBusConnection.
**/
@@ -6125,7 +6125,7 @@ nm_client_reload_connections_async(NMClient *client,
*
* Gets the result of an nm_client_reload_connections_async() call.
*
- * Return value: %TRUE on success, %FALSE on failure
+ * Returns: %TRUE on success, %FALSE on failure
**/
gboolean
nm_client_reload_connections_finish(NMClient *client, GAsyncResult *result, GError **error)
@@ -6151,7 +6151,7 @@ nm_client_reload_connections_finish(NMClient *client, GAsyncResult *result, GErr
*
* Gets the current DNS processing mode.
*
- * Return value: the DNS processing mode, or %NULL in case the
+ * Returns: the DNS processing mode, or %NULL in case the
* value is not available.
*
* Since: 1.6
@@ -6170,7 +6170,7 @@ nm_client_get_dns_mode(NMClient *client)
*
* Gets the current DNS resolv.conf manager.
*
- * Return value: the resolv.conf manager or %NULL in case the
+ * Returns: the resolv.conf manager or %NULL in case the
* value is not available.
*
* Since: 1.6
diff --git a/src/libnm-core-impl/nm-utils.c b/src/libnm-core-impl/nm-utils.c
index 9142f82be2..24b798bd0f 100644
--- a/src/libnm-core-impl/nm-utils.c
+++ b/src/libnm-core-impl/nm-utils.c
@@ -3597,7 +3597,7 @@ _nm_property_variant_to_gvalue(GVariant *src_value, GValue *dst_value)
* Before 1.28, it was an error to call this function with any value other than
* <literal>ARPHRD_ETHER</literal> or <literal>ARPHRD_INFINIBAND</literal>.
*
- * Return value: the length or zero if the type is unrecognized.
+ * Returns: the length or zero if the type is unrecognized.
*/
gsize
nm_utils_hwaddr_len(int type)
@@ -3621,7 +3621,7 @@ nm_utils_hwaddr_len(int type)
* eg "00:11" or "0:1". Any "0x" at the beginning of @hex is ignored. @hex
* may not start or end with ':'.
*
- * Return value: (transfer full): the converted bytes, or %NULL on error
+ * Returns: (transfer full): the converted bytes, or %NULL on error
*/
GBytes *
nm_utils_hexstr2bin(const char *hex)
@@ -3644,7 +3644,7 @@ nm_utils_hexstr2bin(const char *hex)
* Parses @asc and converts it to binary form in a #GByteArray. See
* nm_utils_hwaddr_aton() if you don't want a #GByteArray.
*
- * Return value: (transfer full): a new #GByteArray, or %NULL if @asc couldn't
+ * Returns: (transfer full): a new #GByteArray, or %NULL if @asc couldn't
* be parsed
*/
GByteArray *
@@ -3676,7 +3676,7 @@ fail:
* Parses @asc and converts it to binary form in @buffer.
* Bytes in @asc can be separated by colons (:), or hyphens (-), but not mixed.
*
- * Return value: @buffer, or %NULL if @asc couldn't be parsed
+ * Returns: @buffer, or %NULL if @asc couldn't be parsed
* or would be shorter or longer than @length.
*/
guint8 *
@@ -3699,7 +3699,7 @@ nm_utils_hwaddr_aton(const char *asc, gpointer buffer, gsize length)
* greater than -1, the returned string is terminated at that index
* (returned_string[final_len] == '\0'),
*
- * Return value: (transfer full): the textual form of @bytes
+ * Returns: (transfer full): the textual form of @bytes
*/
char *
nm_utils_bin2hexstr(gconstpointer src, gsize len, int final_len)
@@ -3720,7 +3720,7 @@ nm_utils_bin2hexstr(gconstpointer src, gsize len, int final_len)
*
* Converts @addr to textual form.
*
- * Return value: (transfer full): the textual form of @addr
+ * Returns: (transfer full): the textual form of @addr
*/
char *
nm_utils_hwaddr_ntoa(gconstpointer addr, gsize length)
@@ -3740,7 +3740,7 @@ nm_utils_hwaddr_ntoa(gconstpointer addr, gsize length)
* Parses @asc to see if it is a valid hardware address of the given
* length.
*
- * Return value: %TRUE if @asc appears to be a valid hardware address
+ * Returns: %TRUE if @asc appears to be a valid hardware address
* of the indicated length, %FALSE if not.
*/
gboolean
@@ -3771,7 +3771,7 @@ nm_utils_hwaddr_valid(const char *asc, gssize length)
* length, and if so, returns it in canonical form (uppercase, with
* leading 0s as needed, and with colons rather than hyphens).
*
- * Return value: (transfer full): the canonicalized address if @asc appears to
+ * Returns: (transfer full): the canonicalized address if @asc appears to
* be a valid hardware address of the indicated length, %NULL if not.
*/
char *
@@ -3832,7 +3832,7 @@ _nm_utils_ipaddr_canonical_or_invalid(int addr_family, const char *ip, gboolean
/*
* Determine if given Ethernet address is link-local
*
- * Return value: %TRUE if @mac is link local
+ * Returns: %TRUE if @mac is link local
* reserved addr (01:80:c2:00:00:0X) per IEEE 802.1Q 8.6.3 Frame filtering, %FALSE if not.
*/
gboolean
@@ -3889,7 +3889,7 @@ _nm_utils_hwaddr_link_local_valid(const char *mac)
* sanity-checked before comparing them against known good addresses; they are
* guaranteed to not match if they are invalid.)
*
- * Return value: %TRUE if @hwaddr1 and @hwaddr2 are equivalent, %FALSE if they are
+ * Returns: %TRUE if @hwaddr1 and @hwaddr2 are equivalent, %FALSE if they are
* different (or either of them is invalid).
*/
gboolean
@@ -4431,7 +4431,7 @@ nm_utils_inet6_ntop(const struct in6_addr *in6addr, char *dst)
*
* Checks if @ip contains a valid IP address of the given family.
*
- * Return value: %TRUE or %FALSE
+ * Returns: %TRUE or %FALSE
*/
gboolean
nm_utils_ipaddr_valid(int family, const char *ip)
@@ -4448,7 +4448,7 @@ nm_utils_ipaddr_valid(int family, const char *ip)
* Checks if @duid string contains either a special duid value ("ll",
* "llt", "lease" or the "stable" variants) or a valid hex DUID.
*
- * Return value: %TRUE or %FALSE
+ * Returns: %TRUE or %FALSE
*/
gboolean
_nm_utils_dhcp_duid_valid(const char *duid, GBytes **out_duid_bin)
diff --git a/src/libnm-glib-aux/nm-dedup-multi.c b/src/libnm-glib-aux/nm-dedup-multi.c
index 9cd289c34d..cf2dba90be 100644
--- a/src/libnm-glib-aux/nm-dedup-multi.c
+++ b/src/libnm-glib-aux/nm-dedup-multi.c
@@ -420,7 +420,7 @@ nm_dedup_multi_index_add(NMDedupMultiIndex *self,
*
* Adds and object to the index.
*
- * Return: %TRUE if anything changed, %FALSE if nothing changed.
+ * Returns: %TRUE if anything changed, %FALSE if nothing changed.
*/
gboolean
nm_dedup_multi_index_add_full(NMDedupMultiIndex *self,
diff --git a/src/libnm-glib-aux/nm-shared-utils.c b/src/libnm-glib-aux/nm-shared-utils.c
index f3575074f9..0d1cd75e7f 100644
--- a/src/libnm-glib-aux/nm-shared-utils.c
+++ b/src/libnm-glib-aux/nm-shared-utils.c
@@ -66,7 +66,7 @@ nm_ether_addr_from_string(NMEtherAddr *addr, const char *str)
*
* Checks if only the bottom 64bits of the address are set.
*
- * Return value: %TRUE or %FALSE
+ * Returns: %TRUE or %FALSE
*/
gboolean
_nm_utils_inet6_is_token(const struct in6_addr *in6addr)
@@ -6775,7 +6775,7 @@ valid_ldh_char(char c)
* @s: the hostname to check.
* @trailing_dot: Accept trailing dot on multi-label names.
*
- * Return: %TRUE if valid.
+ * Returns: %TRUE if valid.
*/
gboolean
nm_hostname_is_valid(const char *s, gboolean trailing_dot)
diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h
index d9f1d7b008..84ff6b6a1d 100644
--- a/src/libnm-glib-aux/nm-shared-utils.h
+++ b/src/libnm-glib-aux/nm-shared-utils.h
@@ -2719,7 +2719,7 @@ guint8 *nm_utils_hexstr2bin_alloc(const char *hexstr,
* can parse addresses of any length. That is, you don't need
* to know the length before-hand.
*
- * Return value: @buffer, or %NULL if @asc couldn't be parsed.
+ * Returns: @buffer, or %NULL if @asc couldn't be parsed.
*/
static inline guint8 *
_nm_utils_hwaddr_aton(const char *asc, gpointer buffer, gsize buffer_length, gsize *out_length)
diff --git a/src/libnmt-newt/nmt-newt-widget.c b/src/libnmt-newt/nmt-newt-widget.c
index 8b5647aa9b..2f17d8f266 100644
--- a/src/libnmt-newt/nmt-newt-widget.c
+++ b/src/libnmt-newt/nmt-newt-widget.c
@@ -171,7 +171,7 @@ nmt_newt_widget_get_components(NmtNewtWidget *widget)
*
* Finds the widget inside @widget that owns @co.
*
- * Return value: @co's owner, or %NULL if it was not found.
+ * Returns: @co's owner, or %NULL if it was not found.
*/
NmtNewtWidget *
nmt_newt_widget_find_component(NmtNewtWidget *widget, newtComponent co)
diff --git a/src/nmcli/connections.c b/src/nmcli/connections.c
index 348c72e9a7..38ce23cf0a 100644
--- a/src/nmcli/connections.c
+++ b/src/nmcli/connections.c
@@ -7561,7 +7561,7 @@ confirm_quit(const NmcConfig *nmc_config)
/*
* Submenu for detailed property editing
- * Return: TRUE - continue; FALSE - should quit
+ * Returns TRUE for continue; FALSE for should quit.
*/
static gboolean
property_edit_submenu(NmCli *nmc,