mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 17:38:42 +00:00
lldp: make sd_lldp_neighbor_tlv_rewind() return whether there's a first entry
This way it's nicer to use as it matches how sd_lldp_neighbor_tlv_next() indicates an EOF too via its return value.
This commit is contained in:
@@ -686,7 +686,7 @@ _public_ int sd_lldp_neighbor_tlv_rewind(sd_lldp_neighbor *n) {
|
||||
assert(n->raw_size >= sizeof(struct ether_header));
|
||||
n->rindex = sizeof(struct ether_header);
|
||||
|
||||
return 0;
|
||||
return n->rindex < n->raw_size;
|
||||
}
|
||||
|
||||
_public_ int sd_lldp_neighbor_tlv_next(sd_lldp_neighbor *n) {
|
||||
|
||||
Reference in New Issue
Block a user