summaryrefslogtreecommitdiffstats
path: root/lib/route/rtnl.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-05-12 13:04:48 (GMT)
committerThomas Haller <thaller@redhat.com>2015-05-12 13:56:50 (GMT)
commit48182486341d1de7892494f272e892c0b18ebef5 (patch)
tree108923bdf7b27f8bca7a415ab17953e6b9ebf4d5 /lib/route/rtnl.c
parentc3dd6a7355ace3d1fca1e82a0eb21e0e43dddfba (diff)
downloadlibnl-48182486341d1de7892494f272e892c0b18ebef5.zip
libnl-48182486341d1de7892494f272e892c0b18ebef5.tar.gz
libnl-48182486341d1de7892494f272e892c0b18ebef5.tar.bz2
lib/doc: clearify return value of send_simple() functions
The return value of the *nl_send_simple() functions is inconsistent and not according to the documentation. nl_send_simple() is document to return the number of bytes sent. Other *nl_send_simple() functions are documented to return 0 on success -- for the most part. See also commit b70174668b9867de573cf51471bc98bfe7fd2bc3 which changed behavior of nl_rtgen_request() to be according to documenation. Don't change behavior again, only adjust the documentation. http://lists.infradead.org/pipermail/libnl/2015-May/001872.html Reported-by: Xiao Jia <stfairy@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/route/rtnl.c')
-rw-r--r--lib/route/rtnl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/route/rtnl.c b/lib/route/rtnl.c
index 242e2a8..e0a7f2a 100644
--- a/lib/route/rtnl.c
+++ b/lib/route/rtnl.c
@@ -34,9 +34,9 @@
* Fills out a routing netlink request message and sends it out
* using nl_send_simple().
*
- * @return 0 on success or a negative error code. Due to a bug in
- * older versions, this returned the number of bytes sent. So for
- * compatibility, treat positive return values as success too.
+ * @return 0 on success or a negative error code. Due to a bug in older
+ * version of the library, this function returned the number of bytes sent.
+ * Treat any non-negative number as success.
*/
int nl_rtgen_request(struct nl_sock *sk, int type, int family, int flags)
{