From owner-svn-src-head@FreeBSD.ORG Mon Mar 8 11:27:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5207C106567D; Mon, 8 Mar 2010 11:27:09 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40CF48FC12; Mon, 8 Mar 2010 11:27:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o28BR99r077993; Mon, 8 Mar 2010 11:27:09 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o28BR9f7077990; Mon, 8 Mar 2010 11:27:09 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003081127.o28BR9f7077990@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 8 Mar 2010 11:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204865 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 11:27:09 -0000 Author: luigi Date: Mon Mar 8 11:27:08 2010 New Revision: 204865 URL: http://svn.freebsd.org/changeset/base/204865 Log: don't use C++ keywords as variable names Modified: head/sys/netinet/ipfw/dn_heap.c head/sys/netinet/ipfw/dn_heap.h Modified: head/sys/netinet/ipfw/dn_heap.c ============================================================================== --- head/sys/netinet/ipfw/dn_heap.c Mon Mar 8 11:25:45 2010 (r204864) +++ head/sys/netinet/ipfw/dn_heap.c Mon Mar 8 11:27:08 2010 (r204865) @@ -323,20 +323,20 @@ struct dn_ht { int ofs; /* offset of link field */ uint32_t (*hash)(uintptr_t, int, void *arg); int (*match)(void *_el, uintptr_t key, int, void *); - void *(*new)(uintptr_t, int, void *); + void *(*newh)(uintptr_t, int, void *); void **ht; /* bucket heads */ }; /* * Initialize, allocating bucket pointers inline. * Recycle previous record if possible. - * If the 'new' function is not supplied, we assume that the + * If the 'newh' function is not supplied, we assume that the * key passed to ht_find is the same object to be stored in. */ struct dn_ht * dn_ht_init(struct dn_ht *ht, int buckets, int ofs, uint32_t (*h)(uintptr_t, int, void *), int (*match)(void *, uintptr_t, int, void *), - void *(*new)(uintptr_t, int, void *)) + void *(*newh)(uintptr_t, int, void *)) { int l; @@ -410,7 +410,7 @@ dn_ht_init(struct dn_ht *ht, int buckets ht->ofs = ofs; ht->hash = h; ht->match = match; - ht->new = new; + ht->newh = newh; } return ht; } @@ -471,8 +471,8 @@ dn_ht_find(struct dn_ht *ht, uintptr_t k } else if (flags & DNHT_INSERT) { // printf("%s before calling new, bucket %d ofs %d\n", // __FUNCTION__, i, ht->ofs); - p = ht->new ? ht->new(key, flags, arg) : (void *)key; - // printf("%s new returns %p\n", __FUNCTION__, p); + p = ht->newh ? ht->newh(key, flags, arg) : (void *)key; + // printf("%s newh returns %p\n", __FUNCTION__, p); if (p) { ht->entries++; *(void **)((char *)p + ht->ofs) = ht->ht[i]; Modified: head/sys/netinet/ipfw/dn_heap.h ============================================================================== --- head/sys/netinet/ipfw/dn_heap.h Mon Mar 8 11:25:45 2010 (r204864) +++ head/sys/netinet/ipfw/dn_heap.h Mon Mar 8 11:27:08 2010 (r204865) @@ -119,7 +119,7 @@ int heap_scan(struct dn_heap *, int (*)( * hash(key, flags, arg) called to return a bucket index. * match(obj, key, flags, arg) called to determine if key * matches the current 'obj' in the heap - * new(key, flags, arg) optional, used to allocate a new + * newh(key, flags, arg) optional, used to allocate a new * object during insertions. * * dn_ht_free() frees the heap or unlink elements. @@ -167,7 +167,7 @@ struct dn_ht; /* should be opaque */ struct dn_ht *dn_ht_init(struct dn_ht *, int buckets, int ofs, uint32_t (*hash)(uintptr_t, int, void *), int (*match)(void *, uintptr_t, int, void *), - void *(*new)(uintptr_t, int, void *)); + void *(*newh)(uintptr_t, int, void *)); void dn_ht_free(struct dn_ht *, int flags); void *dn_ht_find(struct dn_ht *, uintptr_t, int, void *);