]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: tulip: Remove private "strncmp"
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 4 Dec 2014 10:30:40 +0000 (11:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 18:45:29 +0000 (13:45 -0500)
commit36c71a735ac2c7046ab1c234c734b2dd9035ad4f
tree2e8024ac9d451f26377debdd829c90a1a60dda8f
parentc8a73a3568ed071a5b99c365f09f4b015238edb2
net: tulip: Remove private "strncmp"

The comment says that the built-in strncmp didn't work. That is not
surprising, as apparently "str" semantics are not really what is
wanted (hint: de4x5_strncmp only stops when two different bytes are
encountered or the end is reached; not if either byte happens to be
0). de4x5_strncmp is actually a memcmp (except for the signature and
that bytes are not necessarily treated as unsigned char); since only
the boolean value of the result is used we can just replace
de4x5_strncmp with memcmp.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dec/tulip/de4x5.c