summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/lldp-internal.c
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-07-10 18:26:06 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2015-10-02 17:11:41 +0200
commit97030a86f0137bca52c3cf9b30e5ed3bdf69b2f2 (patch)
treec1e02e95431039b447bef090cffe65f895e111f6 /src/libsystemd-network/lldp-internal.c
parent2212d76d08f3bc34c683aed1a6736325b841625c (diff)
lldp: change order of arguments of lldp_read_*() functions
These functions are going to be exported, swap the 'data' and 'length' arguments so that their signature is consistent with the rest of the code.
Diffstat (limited to 'src/libsystemd-network/lldp-internal.c')
-rw-r--r--src/libsystemd-network/lldp-internal.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libsystemd-network/lldp-internal.c b/src/libsystemd-network/lldp-internal.c
index 2906b5a4b6..7695805946 100644
--- a/src/libsystemd-network/lldp-internal.c
+++ b/src/libsystemd-network/lldp-internal.c
@@ -30,8 +30,8 @@
int lldp_read_chassis_id(tlv_packet *tlv,
uint8_t *type,
- uint16_t *length,
- uint8_t **data) {
+ uint8_t **data,
+ uint16_t *length) {
uint8_t subtype;
int r;
@@ -69,8 +69,8 @@ int lldp_read_chassis_id(tlv_packet *tlv,
int lldp_read_port_id(tlv_packet *tlv,
uint8_t *type,
- uint16_t *length,
- uint8_t **data) {
+ uint8_t **data,
+ uint16_t *length) {
uint8_t subtype;
char *s;
int r;
@@ -137,8 +137,8 @@ int lldp_read_ttl(tlv_packet *tlv, uint16_t *ttl) {
}
int lldp_read_system_name(tlv_packet *tlv,
- uint16_t *length,
- char **data) {
+ char **data,
+ uint16_t *length) {
char *s;
int r;
@@ -161,8 +161,8 @@ int lldp_read_system_name(tlv_packet *tlv,
}
int lldp_read_system_description(tlv_packet *tlv,
- uint16_t *length,
- char **data) {
+ char **data,
+ uint16_t *length) {
char *s;
int r;
@@ -185,8 +185,8 @@ int lldp_read_system_description(tlv_packet *tlv,
}
int lldp_read_port_description(tlv_packet *tlv,
- uint16_t *length,
- char **data) {
+ char **data,
+ uint16_t *length) {
char *s;
int r;
@@ -244,7 +244,7 @@ int lldp_mib_update_objects(lldp_chassis *c, tlv_packet *tlv) {
assert_return(c, -EINVAL);
assert_return(tlv, -EINVAL);
- r = lldp_read_port_id(tlv, &type, &length, &data);
+ r = lldp_read_port_id(tlv, &type, &data, &length);
if (r < 0)
return r;
@@ -281,7 +281,7 @@ int lldp_mib_remove_objects(lldp_chassis *c, tlv_packet *tlv) {
assert_return(c, -EINVAL);
assert_return(tlv, -EINVAL);
- r = lldp_read_port_id(tlv, &type, &length, &data);
+ r = lldp_read_port_id(tlv, &type, &data, &length);
if (r < 0)
return r;
@@ -312,7 +312,7 @@ int lldp_mib_add_objects(Prioq *by_expiry,
assert_return(neighbour_mib, -EINVAL);
assert_return(tlv, -EINVAL);
- r = lldp_read_chassis_id(tlv, &subtype, &length, &data);
+ r = lldp_read_chassis_id(tlv, &subtype, &data, &length);
if (r < 0)
goto drop;
@@ -452,7 +452,7 @@ int lldp_neighbour_port_new(lldp_chassis *c,
assert(tlv);
- r = lldp_read_port_id(tlv, &type, &length, &data);
+ r = lldp_read_port_id(tlv, &type, &data, &length);
if (r < 0)
return r;
@@ -505,7 +505,7 @@ int lldp_chassis_new(tlv_packet *tlv,
assert(tlv);
- r = lldp_read_chassis_id(tlv, &type, &length, &data);
+ r = lldp_read_chassis_id(tlv, &type, &data, &length);
if (r < 0)
return r;