]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net/net.c: Fix GCC 4.6 build warning
authorWolfgang Denk <wd@denx.de>
Fri, 4 Nov 2011 15:55:42 +0000 (15:55 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 7 Nov 2011 21:14:29 +0000 (22:14 +0100)
Fix:
net.c: In function 'CDPHandler':
net.c:1083:8: warning: variable 'applid' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
net/net.c

index 8f55281f406dc0bf97e71b66b990795db353d7cc..d0fe1c4960a2fb024dc5cb704712fb0e61ab785e 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -1080,7 +1080,6 @@ CDPHandler(const uchar *pkt, unsigned len)
        const uchar *t;
        const ushort *ss;
        ushort type, tlen;
-       uchar applid;
        ushort vlan, nvlan;
 
        /* minimum size? */
@@ -1152,11 +1151,10 @@ CDPHandler(const uchar *pkt, unsigned len)
                                if (tlen < 3)
                                        goto pkt_short;
 
-                               applid = t[0];
                                ss = (const ushort *)(t + 1);
 
 #ifdef CONFIG_CDP_APPLIANCE_VLAN_TYPE
-                               if (applid == CONFIG_CDP_APPLIANCE_VLAN_TYPE)
+                               if (t[0] == CONFIG_CDP_APPLIANCE_VLAN_TYPE)
                                        vlan = *ss;
 #else
                                /* XXX will this work; dunno */