summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-03-08 11:27:08 +0000
committerluigi <luigi@FreeBSD.org>2010-03-08 11:27:08 +0000
commit4cac8d2a86b87f5ec3b05bd376901ebfb5069707 (patch)
tree5a30488a478b6c0a079ab4831632e7bfc7470446
parentd13cb4f803574293af53cd30e8e76a9d8f7b8f1b (diff)
downloadFreeBSD-src-4cac8d2a86b87f5ec3b05bd376901ebfb5069707.zip
FreeBSD-src-4cac8d2a86b87f5ec3b05bd376901ebfb5069707.tar.gz
don't use C++ keywords as variable names
-rw-r--r--sys/netinet/ipfw/dn_heap.c12
-rw-r--r--sys/netinet/ipfw/dn_heap.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/ipfw/dn_heap.c b/sys/netinet/ipfw/dn_heap.c
index ec9cb6c..6773851 100644
--- a/sys/netinet/ipfw/dn_heap.c
+++ b/sys/netinet/ipfw/dn_heap.c
@@ -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, int ofs,
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 key, int flags, void *arg)
} 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];
diff --git a/sys/netinet/ipfw/dn_heap.h b/sys/netinet/ipfw/dn_heap.h
index a663f91..c95473a 100644
--- a/sys/netinet/ipfw/dn_heap.h
+++ b/sys/netinet/ipfw/dn_heap.h
@@ -119,7 +119,7 @@ int heap_scan(struct dn_heap *, int (*)(void *, uintptr_t), uintptr_t);
* 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 *);
OpenPOWER on IntegriCloud