Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41367
b: refs/heads/master
c: bb24249
h: refs/heads/master
i:
  41365: e2fb6ac
  41363: 7adc1f9
  41359: a0e8c27
v: v3
  • Loading branch information
Chad Sellers authored and James Morris committed Nov 28, 2006
1 parent 2235753 commit 059b7e4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c45899879e8caadb78f04c9c639f4c2025b9f00
refs/heads/master: bb242497474da317a7169cc939c741ccf2e79e8c
6 changes: 3 additions & 3 deletions trunk/security/selinux/ss/hashtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <linux/errno.h>
#include "hashtab.h"

struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, void *key),
int (*keycmp)(struct hashtab *h, void *key1, void *key2),
struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, const void *key),
int (*keycmp)(struct hashtab *h, const void *key1, const void *key2),
u32 size)
{
struct hashtab *p;
Expand Down Expand Up @@ -71,7 +71,7 @@ int hashtab_insert(struct hashtab *h, void *key, void *datum)
return 0;
}

void *hashtab_search(struct hashtab *h, void *key)
void *hashtab_search(struct hashtab *h, const void *key)
{
u32 hvalue;
struct hashtab_node *cur;
Expand Down
10 changes: 5 additions & 5 deletions trunk/security/selinux/ss/hashtab.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ struct hashtab {
struct hashtab_node **htable; /* hash table */
u32 size; /* number of slots in hash table */
u32 nel; /* number of elements in hash table */
u32 (*hash_value)(struct hashtab *h, void *key);
u32 (*hash_value)(struct hashtab *h, const void *key);
/* hash function */
int (*keycmp)(struct hashtab *h, void *key1, void *key2);
int (*keycmp)(struct hashtab *h, const void *key1, const void *key2);
/* key comparison function */
};

Expand All @@ -39,8 +39,8 @@ struct hashtab_info {
* Returns NULL if insufficent space is available or
* the new hash table otherwise.
*/
struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, void *key),
int (*keycmp)(struct hashtab *h, void *key1, void *key2),
struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, const void *key),
int (*keycmp)(struct hashtab *h, const void *key1, const void *key2),
u32 size);

/*
Expand All @@ -59,7 +59,7 @@ int hashtab_insert(struct hashtab *h, void *k, void *d);
* Returns NULL if no entry has the specified key or
* the datum of the entry otherwise.
*/
void *hashtab_search(struct hashtab *h, void *k);
void *hashtab_search(struct hashtab *h, const void *k);

/*
* Destroys the specified hash table.
Expand Down
8 changes: 4 additions & 4 deletions trunk/security/selinux/ss/symtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include <linux/errno.h>
#include "symtab.h"

static unsigned int symhash(struct hashtab *h, void *key)
static unsigned int symhash(struct hashtab *h, const void *key)
{
char *p, *keyp;
const char *p, *keyp;
unsigned int size;
unsigned int val;

Expand All @@ -23,9 +23,9 @@ static unsigned int symhash(struct hashtab *h, void *key)
return val & (h->size - 1);
}

static int symcmp(struct hashtab *h, void *key1, void *key2)
static int symcmp(struct hashtab *h, const void *key1, const void *key2)
{
char *keyp1, *keyp2;
const char *keyp1, *keyp2;

keyp1 = key1;
keyp2 = key2;
Expand Down

0 comments on commit 059b7e4

Please sign in to comment.