There are two functions, strnicmp and strncasecmp do the
same thing. In Linux 3.18, strnicmp was renamed to strncasecmp,
and the original function became a wrapper to it. In Linux 4.0,
strnicmp was removed.
There is a problem, strncasecmp in previous kernels doesn't handle
len == 0 properly, and this is the reason of the co-existence of two functions.
In my opinion, both alen and blencan't be zero, it should not break the code
on previous kernels. So I just simply rename the function call, without check if it
is zero to avoid dead code. But I'm not very sure, please verity it.
There are two functions,
strnicmp
andstrncasecmp
do the same thing. In Linux 3.18,strnicmp
was renamed tostrncasecmp
, and the original function became a wrapper to it. In Linux 4.0,strnicmp
was removed.There is a problem,
strncasecmp
in previous kernels doesn't handlelen == 0
properly, and this is the reason of the co-existence of two functions. In my opinion, bothalen
andblen
can't be zero, it should not break the code on previous kernels. So I just simply rename the function call, without check if it is zero to avoid dead code. But I'm not very sure, please verity it.