cvs commit: src/sys/compat/ndis subr_ndis.c src/sys/dev/if_ndis if_ndis.c

Alexey Dokuchaev danfe at nsu.ru
Sun May 30 05:48:43 PDT 2004


On Sun, May 30, 2004 at 11:46:27AM +0200, Pawel Jakub Dawidek wrote:
> On Fri, May 28, 2004 at 11:41:17PM -0700, Bill Paul wrote:
> [...]
> +> +static int
> +> +my_strcasecmp(s1, s2, len)
> +> +        const char              *s1;
> +> +        const char              *s2;
> +> +        int                     len;
> +> +{
> +> +        int                     i;
> +> +
> +> +        for (i = 0; i < len; i++) {
> +> +                if (toupper(s1[i]) != toupper(s2[i]))
> +> +                        return(1);
> +> +        }
> +> +
> +> +        return(0);
> +> +}
> +> +
> 
> Could we move it to libkern? I want to use it too.

Couple of questions/comments:

	* is the any difference whether to use toupper() vs. tolower() ?
	* curly braces are probably not needed
	* style(9) fix: space after `return' statement.

./danfe


More information about the cvs-src mailing list