Subject: Re: CVS commit: src/sys/net
To: None <source-changes@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: source-changes
Date: 08/13/2003 20:08:45
On Thu, Aug 14, 2003 at 12:13:35AM +0000, Jun-ichiro itojun Hagino wrote:
> 
> Module Name:	src
> Committed By:	itojun
> Date:		Thu Aug 14 00:13:35 UTC 2003
> 
> Modified Files:
> 	src/sys/net: if.c
> 
> Log Message:
> correct if_clone_lookup().  based on diff from Quentin Garnier

        /* separate interface name from unit */
        for (cp = name;
            cp - name < IFNAMSIZ && *cp && *cp < '0' && *cp > '9';
            cp++)
                continue;

It looks to me like *cp < '0' && *cp > '9' is always false.  I think
this was intended,

        /* separate interface name from unit */
        for (cp = name;
            cp - name < IFNAMSIZ && *cp && (*cp < '0' || *cp > '9');
            cp++)
                continue;

I am surprised that this did not trip you up when you tested.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933