[ovs-dev] [PATCH] ovs-lldp: Remove unused variable 'lldp_size'.

Ben Pfaff blp at nicira.com
Fri Apr 17 16:31:48 UTC 2015


Thanks, applied.

On Fri, Apr 17, 2015 at 10:24:22AM +0800, Kevin Lo wrote:
> Thanks for fixing it.
> 
> Acked-by: Kevin Lo <kevlo at FreeBSD.org>
> 
> On Thu, Apr 16, 2015 at 01:44:53PM -0700, Ben Pfaff wrote:
> > 
> > Doesn't seem to be good for anything.
> > 
> > Found by LLVM scan-build.
> > 
> > Reported-by: Kevin Lo <kevlo at FreeBSD.org>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> >  lib/ovs-lldp.c | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> > 
> > diff --git a/lib/ovs-lldp.c b/lib/ovs-lldp.c
> > index 9ee639e..61534a4 100644
> > --- a/lib/ovs-lldp.c
> > +++ b/lib/ovs-lldp.c
> > @@ -728,7 +728,6 @@ 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};
> >  
> > @@ -736,10 +735,7 @@ lldp_put_packet(struct lldp *lldp, struct dp_packet *packet,
> >  
> >      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);
> > -- 
> > 2.1.3
> > 
> > 



More information about the dev mailing list