Skip to content

Commit

Permalink
ovs-lldp: Remove unused variable 'lldp_size'.
Browse files Browse the repository at this point in the history
Doesn't seem to be good for anything.

Found by LLVM scan-build.

Reported-by: Kevin Lo <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Kevin Lo <[email protected]>
Acked-by: Dennis Flynn <[email protected]>
  • Loading branch information
blp committed Apr 17, 2015
1 parent 908995c commit 23d735b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/ovs-lldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,18 +728,14 @@ lldp_put_packet(struct lldp *lldp, struct dp_packet *packet,
{
struct lldpd *mylldpd = lldp->lldpd;
struct lldpd_hardware *hw = lldpd_first_hardware(mylldpd);
uint32_t lldp_size = 0;
static const uint8_t eth_addr_lldp[6] =
{0x01, 0x80, 0xC2, 0x00, 0x00, 0x0e};

ovs_mutex_lock(&mutex);

eth_compose(packet, eth_addr_lldp, eth_src, ETH_TYPE_LLDP, 0);

lldp_size = lldpd_send(hw, packet);
if (lldp_size + ETH_HEADER_LEN < MINIMUM_ETH_PACKET_SIZE) {
lldp_size = MINIMUM_ETH_PACKET_SIZE;
}
lldpd_send(hw, packet);

timer_set_duration(&lldp->tx_timer, lldp->lldpd->g_config.c_tx_interval);
ovs_mutex_unlock(&mutex);
Expand Down

0 comments on commit 23d735b

Please sign in to comment.