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:
Lennart Poettering
2016-06-02 17:48:31 +02:00
parent a2966471d8
commit a85b46c33f

View File

@@ -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) {