Skip to contentSkip to conversation

dead code in tc/m_ematch.c

DISCUSSION Jochen Voss 1 participant 1 message Sep 13, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

while looking through the source for the Debian package iproute-20080725, I found the following bit of code (file tc/m_ematch.c, lines 163-173):

    static struct ematch_util *get_ematch_kind_num(__u16 kind)
    {
	    char name[32];

	    if (lookup_map(kind, name, sizeof(name), EMATCH_MAP) < 0)
		    return NULL;

	    return get_ematch_kind(name);

	    return NULL;
    }

Obviously the second return statement has no effect. Probably it should be removed.

I hope this helps,
Jochen

Signature · 1 line
http://seehuhn.de/