]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
lldp: clarify that sd_lldp_neighbor_get_ttl() returns seconds
authorLennart Poettering <lennart@poettering.net>
Thu, 2 Jun 2016 15:46:56 +0000 (17:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 6 Jun 2016 17:59:08 +0000 (19:59 +0200)
Let's simply encode this in the parameter name.

src/libsystemd-network/lldp-neighbor.c
src/systemd/sd-lldp.h

index c14126b60ab51237df4fb7d4bb9938c7e8c1fbdb..9f37e3db1449efb5c4aa98bf43627066c5e166a5 100644 (file)
@@ -595,11 +595,11 @@ done:
         return 0;
 }
 
-_public_ int sd_lldp_neighbor_get_ttl(sd_lldp_neighbor *n, uint16_t *ret) {
+_public_ int sd_lldp_neighbor_get_ttl(sd_lldp_neighbor *n, uint16_t *ret_sec) {
         assert_return(n, -EINVAL);
-        assert_return(ret, -EINVAL);
+        assert_return(ret_sec, -EINVAL);
 
-        *ret = n->ttl;
+        *ret_sec = n->ttl;
         return 0;
 }
 
index 8f096c1b99aa3886bcf4ff0a65e9543e0c5d057c..f9b79a0c402f2914e0f9fc5813730cb1dc8d266e 100644 (file)
@@ -155,7 +155,7 @@ int sd_lldp_neighbor_get_chassis_id(sd_lldp_neighbor *n, uint8_t *type, const vo
 int sd_lldp_neighbor_get_chassis_id_as_string(sd_lldp_neighbor *n, const char **ret);
 int sd_lldp_neighbor_get_port_id(sd_lldp_neighbor *n, uint8_t *type, const void **ret, size_t *size);
 int sd_lldp_neighbor_get_port_id_as_string(sd_lldp_neighbor *n, const char **ret);
-int sd_lldp_neighbor_get_ttl(sd_lldp_neighbor *n, uint16_t *ret);
+int sd_lldp_neighbor_get_ttl(sd_lldp_neighbor *n, uint16_t *ret_sec);
 int sd_lldp_neighbor_get_system_name(sd_lldp_neighbor *n, const char **ret);
 int sd_lldp_neighbor_get_system_description(sd_lldp_neighbor *n, const char **ret);
 int sd_lldp_neighbor_get_port_description(sd_lldp_neighbor *n, const char **ret);