ng_base.c (53403) | ng_base.c (53648) |
---|---|
1 2/* 3 * ng_base.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Authors: Julian Elischer <julian@whistle.com> 38 * Archie Cobbs <archie@whistle.com> 39 * | 1 2/* 3 * ng_base.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Authors: Julian Elischer <julian@whistle.com> 38 * Archie Cobbs <archie@whistle.com> 39 * |
40 * $FreeBSD: head/sys/netgraph/ng_base.c 53403 1999-11-19 05:43:33Z archie $ | 40 * $FreeBSD: head/sys/netgraph/ng_base.c 53648 1999-11-24 01:03:08Z archie $ |
41 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $ 42 */ 43 44/* 45 * This file implements the base netgraph code. 46 */ 47 48#include <sys/param.h> --- 373 unchanged lines hidden (view full) --- 422/* 423 * Decode a ID name, eg. "[f03034de]". Returns 0 if the 424 * string is not valid, otherwise returns the value. 425 */ 426static ng_ID_t 427ng_decodeidname(const char *name) 428{ 429 const int len = strlen(name); | 41 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $ 42 */ 43 44/* 45 * This file implements the base netgraph code. 46 */ 47 48#include <sys/param.h> --- 373 unchanged lines hidden (view full) --- 422/* 423 * Decode a ID name, eg. "[f03034de]". Returns 0 if the 424 * string is not valid, otherwise returns the value. 425 */ 426static ng_ID_t 427ng_decodeidname(const char *name) 428{ 429 const int len = strlen(name); |
430 const char *eptr; | 430 char *eptr; |
431 u_long val; 432 433 /* Check for proper length, brackets, no leading junk */ 434 if (len < 3 || name[0] != '[' || name[len - 1] != ']' 435 || !isxdigit(name[1])) 436 return (0); 437 438 /* Decode number */ --- 1213 unchanged lines hidden --- | 431 u_long val; 432 433 /* Check for proper length, brackets, no leading junk */ 434 if (len < 3 || name[0] != '[' || name[len - 1] != ']' 435 || !isxdigit(name[1])) 436 return (0); 437 438 /* Decode number */ --- 1213 unchanged lines hidden --- |